sockmap: Fix UAF and broken memory accounting for UDP.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest6 patches 24 repliesIn review
- v36 patches 1 replySuperseded
- v26 patches 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 6 patches | 3 replies | Superseded |
Changes in v4 from the cover letter
Patch 4: Don't pass gfp_flags and instead change it based on
take_ref in the next patch
Patch 5: Fix memory accounting condition from (skb->sk != sk) to
(skb->sk != sk && take_ref), the cause of selftest failure
Patch 6: Fix deadlock when requeued
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | sockmap: Annotate sk->sk_data_ready() for UDP.net/ net/ | +3 | 2 replies | |
| 2/6 | sockmap: Annotate sk->sk_write_space() for UDP.net/ net/ net/ | +8 | 6 replies | |
| 3/6 | sockmap: Fix use-after-free in udp_bpf_recvmsg().net/ | +9 | 5 replies | |
| 4/6 | sockmap: Inline sk_psock_create_ingress_msg().net/ | +15 | 1 reply | |
| 5/6 | sockmap: Consolidate sk_psock_skb_ingress_self().net/ | +17 | 0 replies | |
| 6/6 | sockmap: Fix broken memory accounting for UDP.include/ net/ net/ | +43 | 10 replies |
Reviews trailers per patch
4 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Jakub Sitnicki | Jiayuan Chen |
|---|---|---|
| 1/6 | R-b | R-b |
| 2/6 | R-b | R-b |
| 3/6 | R-b | R-b |
| 4/6 | R-b | |
| 5/6 | ||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 bpf/net 0/6] sockmap: Fix UAF and broken memory accounting for UDP.
syzbot reported 3 issues in SOCKMAP for UDP.
Patch 1 - 2 fix lockless accesses to sk->sk_data_ready() and sk->sk_write_space().
Patch 3 fixes UAF in sk_msg_recvmsg().
Patch 4 - 5 consolidate sk_psock_skb_ingress_self() into sk_psock_skb_ingress() as prep.
Patch 6 fixes broken memory accounting.
Changes:
v4:
Patch 4: Don't pass gfp_flags and instead change it based on
take_ref in the next patch
Patch 5: Fix memory accounting condition from (skb->sk != sk) to
(skb->sk != sk && take_ref), the cause of selftest failure
Patch 6: Fix deadlock when requeued
v3: https://lore.kernel.org/netdev/[email protected]/
Patch 2: Use WRITE_ONCE() in udp_bpf_update_proto()
v2: https://lore.kernel.org/netdev/[email protected]/
Patch 2: Cache sk->sk_write_space in sock_wfree()
Patch 5: Keep msg->sk assignment
Patch 6: Fix build failure when CONFIG_INET=nv1: https://lore.kernel.org/netdev/[email protected]/
Kuniyuki Iwashima (6):
sockmap: Annotate sk->sk_data_ready() for UDP.
sockmap: Annotate sk->sk_write_space() for UDP.
sockmap: Fix use-after-free in udp_bpf_recvmsg().
sockmap: Inline sk_psock_create_ingress_msg().
sockmap: Consolidate sk_psock_skb_ingress_self().
sockmap: Fix broken memory accounting for UDP.
include/net/udp.h | 9 ++++ net/core/skmsg.c | 100 +++++++++++++++++++++------------------------ net/core/sock.c | 8 +++- net/ipv4/udp.c | 11 ++++- net/ipv4/udp_bpf.c | 11 ++++- 5 files changed, 81 insertions(+), 58 deletions(-)
Signature · 1 line
2.53.0.371.g1d285c8824-goog