udp: Fix two integer overflows when sk->sk_rcvbuf is close to INT_MAX.
Status from this message: This series was applied to netdev/net.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest2 patches 0 repliesApplied 2/2
- v43 patches 8 repliesSuperseded
- v33 patches 2 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 3 patches | 5 replies | Superseded | |
| v1 | 3 patches | 11 replies | Superseded |
Changes in v5 from the cover letter
* Drop flaky test
* Patch 1
* Update size after skb_condense()
Patches in v5 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | udp: Fix multiple wraparounds of sk->sk_rmem_alloc.net/ | +17 | 0 replies | Applied |
| 2/2 | udp: Fix memory accounting leak.net/ | +7 | 0 replies | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Willem de Bruijn |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 net 0/2] udp: Fix two integer overflows when sk->sk_rcvbuf is close to INT_MAX.
I got a report that UDP mem usage in /proc/net/sockstat did not drop even after an application was terminated.
The issue could happen if sk->sk_rmem_alloc wraps around due to a large sk->sk_rcvbuf, which was INT_MAX in our case.
The patch 2 fixes the issue, and the patch 1 fixes yet another overflow I found while investigating the issue.
v5:
* Drop flaky test
* Patch 1
* Update size after skb_condense()
v4:
* Patch 3
* Wait RCU for at most 30 sec
v3: https://lore.kernel.org/netdev/[email protected]/
* Rebase
* Add Willem's tags
v2: https://lore.kernel.org/netdev/[email protected]/
* Patch 1
* Define rmem and rcvbuf as unsigned int (Eric)
* Take skb->truesize into account for sk with large rcvbuf (Willem)
* Patch 3
* Add a comment
v1: https://lore.kernel.org/netdev/[email protected]/
Kuniyuki Iwashima (2):
udp: Fix multiple wraparounds of sk->sk_rmem_alloc.
udp: Fix memory accounting leak.
net/ipv4/udp.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-)
Signature · 1 line
2.48.1