Skip to content

ss fixes from an OSS scan

Stephen Hemminger netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11ss: fix double close on sock_diag send failuremisc/ss.c+1 -40 replies
2/11ss: drop /proc fallback for socket listingmisc/ss.c+28 -5980 replies
3/11ss: escape names chosen by the socket ownerlib/escape.c misc/ss.c+15 -50 replies
4/11ss: size the TCPDIAG_FILE buffer to the recordmisc/ss.c+25 -50 replies
5/11ss: replay all dumps in TCPDIAG_FILEmisc/ss.c testsuite/tests/ss/ssfilter.t+32 -120 replies
6/11ss: bound state and type name lookupsmisc/ss.c+22 -210 replies
7/11ss: fix rpcbind service cachemisc/ss.c+26 -180 replies
8/11ss: read socket SELinux context only for -zmisc/ss.c+34 -10 replies
9/11ss: check owner before naming a netlink socketman/man8/ss.8 misc/ss.c+48 -60 replies
10/11ss: keep following events after ENOBUFSmisc/ss.c+7 -20 replies
11/11ss: report a failed SCTP or MPTCP dumpmisc/ss.c+4 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH iproute2 00/11] ss fixes from an OSS scan

Fixes for the ss findings of scan iproute2-20261015-004, plus bugs found while confirming them.

The biggest overall change is removing all the fallback /proc parsing. Even the oldest supported LTS kernel now supports netlink for socket diagnostics. Users building their own kernels with custom configs without netlink socket diags will just see an error.

The other changes escape names chosen by whoever owns the socket, bound state and type values from the kernel before indexing name tables, and stop treating a netlink port id as the owner's pid.

The overall output format is unchanged. Replaying a TCPDIAG_FILE does show
more: the recorded IPv6 dump was skipped before, so those rows are new and the address columns widen to fit them.

Stephen Hemminger (11):
ss: fix double close on sock_diag send failure
ss: drop /proc fallback for socket listing
ss: escape names chosen by the socket owner
ss: size the TCPDIAG_FILE buffer to the record
ss: replay all dumps in TCPDIAG_FILE
ss: bound state and type name lookups
ss: fix rpcbind service cache
ss: read socket SELinux context only for -z
ss: check owner before naming a netlink socket
ss: keep following events after ENOBUFS
ss: report a failed SCTP or MPTCP dump

 lib/escape.c                  |   7 +-
 man/man8/ss.8                 |   3 +-
 misc/ss.c                     | 874 +++++++++-------------------------
 testsuite/tests/ss/ssfilter.t |  26 +-
 4 files changed, 239 insertions(+), 671 deletions(-)
Signature · 1 line
2.53.0