diff options
| author | Alexander Potapenko <glider@google.com> | 2017-04-25 18:51:46 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-11-06 15:29:45 +0100 |
| commit | b1c8389f8bb6563ec2d8e518b17eeaec937c63fd (patch) | |
| tree | c774486d966246775ca870e7f118e1ca36c82a14 /scripts/makelst | |
| parent | 03691822a5914225161bfffcea41349c281571c1 (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/makelst')
0 files changed, 0 insertions, 0 deletions
