aboutsummaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2017-04-25 18:51:46 +0200
committerMoyster <oysterized@gmail.com>2017-11-06 15:29:45 +0100
commitb1c8389f8bb6563ec2d8e518b17eeaec937c63fd (patch)
treec774486d966246775ca870e7f118e1ca36c82a14 /scripts/patch-kernel
parent03691822a5914225161bfffcea41349c281571c1 (diff)
net/packet: check length in getsockopt() called with PACKET_HDRLEN
commit fd2c83b35752f0a8236b976978ad4658df14a59f upstream. 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> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions