From: Mashiro Chen <mashiro.chen@mailbox.org>
To: netdev@vger.kernel.org
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, jreuter@yaina.de,
linux-hams@vger.kernel.org, linux-kernel@vger.kernel.org,
Mashiro Chen <mashiro.chen@mailbox.org>
Subject: [PATCH net 0/2] net: hamradio: fix missing input validation in bpqether and scc
Date: Thu, 9 Apr 2026 01:23:56 +0800 [thread overview]
Message-ID: <20260408172358.281186-1-mashiro.chen@mailbox.org> (raw)
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
next reply other threads:[~2026-04-08 17:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 17:23 Mashiro Chen [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260408172358.281186-1-mashiro.chen@mailbox.org \
--to=mashiro.chen@mailbox.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jreuter@yaina.de \
--cc=kuba@kernel.org \
--cc=linux-hams@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox