Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1630843

Re: [PATCH] net/packet: check length in getsockopt() called with PACKET_HDRLEN

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH] net/packet: check length in getsockopt() called with PACKET_HDRLEN
Date 2017-04-25 20:10 +0200
Message-ID <tAd4t-84X-15@gated-at.bofh.it> (permalink)
References <tAbYK-7eg-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Alexander Potapenko <glider@google.com>
Date: Tue, 25 Apr 2017 18:51:46 +0200

> In the case getsockopt() is called with PACKET_HDRLEN and optlen < 4
> |val| remains uninitialized and the syscall may behave differently
> depending on its value, and even copy garbage to userspace on certain
> architectures. To fix this we now return -EINVAL if optlen is too small.
> 
> This bug has been detected with KMSAN.
> 
> Signed-off-by: Alexander Potapenko <glider@google.com>

Applied, thanks.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] net/packet: check length in getsockopt() called with PACKET_HDRLEN Alexander Potapenko <glider@google.com> - 2017-04-25 19:00 +0200
  Re: [PATCH] net/packet: check length in getsockopt() called with  PACKET_HDRLEN David Miller <davem@davemloft.net> - 2017-04-25 20:10 +0200

csiph-web