Fix netlink rcvbuf wraparound
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest3 patches 8 repliesIn review
Changes in v2 from the cover letter
-add Fixes:
-add sock_rcvbuf_has_space() helper
-use helper functions for udp netlink
-remove excessive parentheses
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | net: add sock_rcvbuf_has_space() helperinclude/ | +38 | 0 replies | |
| 2/3 | udp: use __sock_rcvbuf_has_space() helpernet/ | +2 | 0 replies | |
| 3/3 | netlink: Fix wraparound of sk->sk_rmem_allocnet/ | +21 | 8 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH net-next v2 0/3] Fix netlink rcvbuf wraparound
The sk->sk_rmem_alloc field of a netlink socket can wraparound as a signed int when comparing to sk->sk_rcvbuf, when sk->sk_rcvbuf approaches INT_MAX. This can be reproduced by forcing sk->sk_rcvbuf to INT_MAX and this can exhaust all of memory.
I've added a sock_rcvbuf_has_space() helper function to generalize the fix as a similar approach has already been implemented for udp sockets.
v2:
-add Fixes:
-add sock_rcvbuf_has_space() helper
-use helper functions for udp netlink
-remove excessive parentheses
Jason Baron (3):
net: add sock_rcvbuf_has_space() helper
udp: use __sock_rcvbuf_has_space() helper
netlink: Fix wraparound of sk->sk_rmem_alloc
include/net/sock.h | 38 ++++++++++++++++++++++++++++++++++++++ net/ipv4/udp.c | 13 ++----------- net/netlink/af_netlink.c | 35 +++++++++++++++++++++-------------- 3 files changed, 61 insertions(+), 25 deletions(-)
Signature · 1 line
2.25.1