diff options
author | Antonio Messina <amessina@google.com> | 2019-12-19 17:08:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-04 21:13:36 +0300 |
commit | 4840b6a7480b92c0942c10c5db803c67bf3ef9c6 (patch) | |
tree | 868640b41fd11ae1a350be10e6f86053b360e7e1 /Documentation/rtc.txt | |
parent | 6ed6ab5c5d651f5ef66a36fcf54dfe4525d40831 (diff) | |
download | linux-4840b6a7480b92c0942c10c5db803c67bf3ef9c6.tar.xz |
udp: fix integer overflow while computing available space in sk_rcvbuf
[ Upstream commit feed8a4fc9d46c3126fb9fcae0e9248270c6321a ]
When the size of the receive buffer for a socket is close to 2^31 when
computing if we have enough space in the buffer to copy a packet from
the queue to the buffer we might hit an integer overflow.
When an user set net.core.rmem_default to a value close to 2^31 UDP
packets are dropped because of this overflow. This can be visible, for
instance, with failure to resolve hostnames.
This can be fixed by casting sk_rcvbuf (which is an int) to unsigned
int, similarly to how it is done in TCP.
Signed-off-by: Antonio Messina <amessina@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/rtc.txt')
0 files changed, 0 insertions, 0 deletions