public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: hamradio: fix missing input validation in bpqether and scc
@ 2026-04-08 17:23 Mashiro Chen
  2026-04-08 17:23 ` [PATCH net 1/2] net: hamradio: bpqether: validate frame length in bpq_rcv() Mashiro Chen
  2026-04-08 17:23 ` [PATCH net 2/2] net: hamradio: scc: validate bufsize in SIOCSCCSMEM ioctl Mashiro Chen
  0 siblings, 2 replies; 5+ messages in thread
From: Mashiro Chen @ 2026-04-08 17:23 UTC (permalink / raw)
  To: netdev
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, jreuter, linux-hams,
	linux-kernel, Mashiro Chen

Two fixes for missing input validation in the hamradio drivers:

- bpqether: bpq_rcv() computes frame length as data[0] + data[1]*256 - 5,
  which can underflow when the length fields encode a value less than 5.
  The resulting negative value is subsequently used as an unsigned length,
  leading to out-of-bounds access.

- scc: the SIOCSCCSMEM ioctl accepts a bufsize of 0 without validation.
  When a receive interrupt fires, dev_alloc_skb(0) allocates an skb with
  an empty data area, and the subsequent skb_put_u8() calls write into
  the adjacent skb_shared_info, corrupting heap memory.

Both fixes are minimal, adding only a bounds check before the dangerous
operation.

Mashiro Chen (2):
  net: hamradio: bpqether: validate frame length in bpq_rcv()
  net: hamradio: scc: validate bufsize in SIOCSCCSMEM ioctl

 drivers/net/hamradio/bpqether.c | 3 +++
 drivers/net/hamradio/scc.c      | 2 ++
 2 files changed, 5 insertions(+)

-- 
2.53.0


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

end of thread, other threads:[~2026-04-08 21:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-08 17:23 [PATCH net 0/2] net: hamradio: fix missing input validation in bpqether and scc Mashiro Chen
2026-04-08 17:23 ` [PATCH net 1/2] net: hamradio: bpqether: validate frame length in bpq_rcv() Mashiro Chen
2026-04-08 21:05   ` Joerg Reuter
2026-04-08 17:23 ` [PATCH net 2/2] net: hamradio: scc: validate bufsize in SIOCSCCSMEM ioctl Mashiro Chen
2026-04-08 20:51   ` Joerg Reuter

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