Netdev List
 help / color / mirror / Atom feed
* [PATCH iproute2 0/2] ss: reject malformed /proc fallback records
@ 2026-08-31 10:41 Prabhakar Pujeri
  2026-08-31 10:41 ` [PATCH iproute2 1/2] ss: validate sscanf() return value in packet_show_line() Prabhakar Pujeri
  2026-08-31 10:41 ` [PATCH iproute2 2/2] ss: validate sscanf() return value in netlink_show() Prabhakar Pujeri
  0 siblings, 2 replies; 4+ messages in thread
From: Prabhakar Pujeri @ 2026-08-31 10:41 UTC (permalink / raw)
  To: netdev; +Cc: Prabhakar Pujeri, Stephen Hemminger

The packet and netlink fallback parsers use sscanf() to read records from
/proc.  Both paths used the output variables without first checking that
all expected fields were present.

Require a complete record before filtering or printing it.  This prevents
malformed input from leaving socket fields uninitialized.

Tested with a full iproute2 build.

Prabhakar Pujeri (2):
  ss: validate sscanf() return value in packet_show_line()
  ss: validate sscanf() return value in netlink_show()

 misc/ss.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

-- 
2.55.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-01 13:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 10:41 [PATCH iproute2 0/2] ss: reject malformed /proc fallback records Prabhakar Pujeri
2026-08-31 10:41 ` [PATCH iproute2 1/2] ss: validate sscanf() return value in packet_show_line() Prabhakar Pujeri
2026-09-01 13:45   ` Stephen Hemminger
2026-08-31 10:41 ` [PATCH iproute2 2/2] ss: validate sscanf() return value in netlink_show() Prabhakar Pujeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox