netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dan.carpenter@oracle.com
Cc: netdev@vger.kernel.org, security@kernel.org, juri.aedla@gmail.com
Subject: Re: [patch v2] net: heap overflow in __audit_sockaddr()
Date: Thu, 03 Oct 2013 16:06:30 -0400 (EDT)	[thread overview]
Message-ID: <20131003.160630.358364383240386879.davem@davemloft.net> (raw)
In-Reply-To: <20131002212720.GA30492@elgon.mountain>

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 3 Oct 2013 00:27:20 +0300

> We need to cap ->msg_namelen or it leads to a buffer overflow when we
> to the memcpy() in __audit_sockaddr().  It requires CAP_AUDIT_CONTROL to
> exploit this bug.
> 
> The call tree is:
> ___sys_recvmsg()
>   move_addr_to_user()
>     audit_sockaddr()
>       __audit_sockaddr()
> 
> Reported-by: Jüri Aedla <juri.aedla@gmail.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> v2: The limit check to the compat code was missing as pointed out by
> Ben Hutchings.

Applied and queued up for -stable, thanks Dan.

  reply	other threads:[~2013-10-03 20:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 10:10 question about klen in move_addr_to_user() Dan Carpenter
2013-03-19 13:55 ` David Miller
2013-10-02 18:58   ` [patch] net: heap overflow in __audit_sockaddr() Dan Carpenter
2013-10-02 21:11     ` Ben Hutchings
2013-10-02 21:26       ` Dan Carpenter
2013-10-02 21:27       ` [patch v2] " Dan Carpenter
2013-10-03 20:06         ` David Miller [this message]
2013-11-27 11:32         ` Eric Wong
2013-11-27 11:51           ` Hannes Frederic Sowa
2013-11-27 12:40             ` [patch] net: clamp ->msg_namelen instead of returning an error Dan Carpenter
2013-11-27 19:42               ` Eric Wong
2013-11-27 21:27               ` Eric Dumazet
2013-11-29 21:13                 ` David Miller
2013-11-27 20:24             ` [patch v2] net: heap overflow in __audit_sockaddr() Linus Torvalds
2013-11-27 21:18               ` Hannes Frederic Sowa
2013-11-27 13:56           ` David Laight

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=20131003.160630.358364383240386879.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dan.carpenter@oracle.com \
    --cc=juri.aedla@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=security@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).