mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: viro@zeniv.linux.org.uk
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, nbowler@draconx.ca
Subject: Re: [PATCH net] fix a braino in cmsghdr_from_user_compat_to_kern()
Date: Mon, 27 Jul 2020 13:25:58 -0700 (PDT)	[thread overview]
Message-ID: <20200727.132558.1865871927633102126.davem@davemloft.net> (raw)
In-Reply-To: <20200727182220.GI794331@ZenIV.linux.org.uk>

From: Al Viro <viro@zeniv.linux.org.uk>
Date: Mon, 27 Jul 2020 19:22:20 +0100

> 	commit 547ce4cfb34c ("switch cmsghdr_from_user_compat_to_kern() to
> copy_from_user()") missed one of the places where ucmlen should've been
> replaced with cmsg.cmsg_len, now that we are fetching the entire struct
> rather than doing it field-by-field.
> 
> 	As the result, compat sendmsg() with several different-sized cmsg
> attached started to fail with EINVAL.  Trivial to fix, fortunately.
> 
> Reported-by: Nick Bowler <nbowler@draconx.ca>
> Tested-by: Nick Bowler <nbowler@draconx.ca>
> Fixes: 547ce4cfb34c ("switch cmsghdr_from_user_compat_to_kern() to copy_from_user()")
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Applied, thanks Al.

  reply	other threads:[~2020-07-27 20:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 15:51 PROBLEM: cryptsetup fails to unlock drive in 5.8-rc6 (regression) Nick Bowler
2020-07-27 16:05 ` Al Viro
2020-07-27 16:13   ` [PATCH] " Al Viro
2020-07-27 17:42     ` Nick Bowler
2020-07-27 18:22     ` [PATCH net] fix a braino in cmsghdr_from_user_compat_to_kern() Al Viro
2020-07-27 20:25       ` David Miller [this message]
2020-07-27 16:26   ` PROBLEM: cryptsetup fails to unlock drive in 5.8-rc6 (regression) Nick Bowler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200727.132558.1865871927633102126.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nbowler@draconx.ca \
    --cc=netdev@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®