[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20131129.161351.2154176731890615742.davem@davemloft.net>
Date: Fri, 29 Nov 2013 16:13:51 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: dan.carpenter@...cle.com, netdev@...r.kernel.org,
normalperson@...t.net, hannes@...essinduktion.org
Subject: Re: [patch] net: clamp ->msg_namelen instead of returning an error
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Wed, 27 Nov 2013 13:27:46 -0800
> On Wed, 2013-11-27 at 15:40 +0300, Dan Carpenter wrote:
>> If kmsg->msg_namelen > sizeof(struct sockaddr_storage) then in the
>> original code that would lead to memory corruption in the kernel if you
>> had audit configured. If you didn't have audit configured it was
>> harmless.
>>
>> There are some programs such as beta versions of Ruby which use too
>> large of a buffer and returning an error code breaks them. We should
>> clamp the ->msg_namelen value instead.
>>
>> Reported-by: Eric Wong <normalperson@...t.net>
>> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>
> Fixes: 1661bf364ae9 ("net: heap overflow in __audit_sockaddr()")
>
> Acked-by: Eric Dumazet <edumazet@...gle.com>
Applied and queued up for -stable, thanks everyone.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists