From: Samuel Ortiz <sameo@linux.intel.com>
To: Mateusz Jurczyk <mjurczyk@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nfc: Add sockaddr length checks before accessing sa_family in bind handlers
Date: Fri, 23 Jun 2017 00:41:11 +0200 [thread overview]
Message-ID: <20170622224111.GI21214@zurbaran.ger.intel.com> (raw)
In-Reply-To: <20170613164428.3643-1-mjurczyk@google.com>
On Tue, Jun 13, 2017 at 06:44:28PM +0200, Mateusz Jurczyk wrote:
> Verify that the caller-provided sockaddr structure is large enough to
> contain the sa_family field, before accessing it in bind() handlers of the
> AF_NFC socket. Since the syscall doesn't enforce a minimum size of the
> corresponding memory region, very short sockaddrs (zero or one byte long)
> result in operating on uninitialized memory while referencing .sa_family.
>
> Signed-off-by: Mateusz Jurczyk <mjurczyk@google.com>
> ---
> net/nfc/llcp_sock.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Applied to nfc-next, thanks.
Cheers,
Samuel.
prev parent reply other threads:[~2017-06-22 22:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 16:44 [PATCH] nfc: Add sockaddr length checks before accessing sa_family in bind handlers Mateusz Jurczyk
2017-06-22 22:41 ` Samuel Ortiz [this message]
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=20170622224111.GI21214@zurbaran.ger.intel.com \
--to=sameo@linux.intel.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mjurczyk@google.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).