af_unix: Fix inq_len and scm_stat.nr_fds accounting leaks
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | af_unix: Fix inq_len leak when skipping unread OOB skb.net/ | +1 | 0 replies | |
| 2/4 | af_unix: Fix scm_stat.nr_fds leaks for OOB skb.net/ | +13 | 0 replies | |
| 3/4 | af_unix: Fix scm_stat.nr_fds leak in unix_dgram_disconnected().net/ | +28 | 0 replies | |
| 4/4 | selftest: af_unix: Test SIOCINQ and scm_fds with OOB and dgram disconnect.tools/ tools/ | +119 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net 0/4] af_unix: Fix inq_len and scm_stat.nr_fds accounting leaks
This series fixes receive-queue accounting leaks of u->inq_len and u->scm_stat.nr_fds in AF_UNIX sockets, along with selftests:
- Patch 1 fixes a u->inq_len leak in manage_oob() when an unconsumed out-of-band (MSG_OOB) skb is skipped and dropped during a normal read.
- Patch 2 fixes u->scm_stat.nr_fds leaks when an OOB skb is skipped or freed in manage_oob(), unix_stream_recv_urg(), and unix_stream_read_skb().
- Patch 3 fixes a u->scm_stat.nr_fds leak in unix_dgram_disconnected() when purging queued skbs from sk->sk_receive_queue on disconnect.
- Patch 4 adds SIOCINQ and scm_fds (/proc/self/fdinfo/<fd>) checks to the msg_oob and scm_rights selftests.
Siddharth Chintamaneni (4):
af_unix: Fix inq_len leak when skipping unread OOB skb.
af_unix: Fix scm_stat.nr_fds leaks for OOB skb.
af_unix: Fix scm_stat.nr_fds leak in unix_dgram_disconnected().
selftest: af_unix: Test SIOCINQ and scm_fds with OOB and dgram
disconnect.
net/unix/af_unix.c | 69 ++++++----- tools/testing/selftests/net/af_unix/msg_oob.c | 12 +- .../selftests/net/af_unix/scm_rights.c | 108 ++++++++++++++++++ 3 files changed, 161 insertions(+), 28 deletions(-)
Signature · 1 line
2.43.0