From: Mashiro Chen <mashiro.chen@mailbox.org>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, gregkh@linuxfoundation.org,
ben@decadent.org.uk, linux-hams@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Mashiro Chen <mashiro.chen@mailbox.org>
Subject: [PATCH 0/3] net: fix three security bugs in NET/ROM and ROSE stacks
Date: Wed, 8 Apr 2026 01:15:57 +0800 [thread overview]
Message-ID: <20260407171600.102988-1-mashiro.chen@mailbox.org> (raw)
This series fixes three bugs in the Linux kernel AX.25 protocol stack,
submitted on top of Greg Kroah-Hartman's frame-size validation series
(https://lore.kernel.org/r/2026040730-untagged-groin-bbb7@gregkh).
Patch 1 fixes an integer overflow in nr_queue_rx_frame(): nr_sock.fraglen
is declared as unsigned short and accumulates received fragment lengths
without overflow protection. When total received data exceeds 65535 bytes,
fraglen wraps to a small value, causing alloc_skb() to allocate a tiny
buffer followed by a full-length copy -- a heap out-of-bounds write.
Patch 2 fixes nr_find_socket() dispatching incoming NR_INFO frames by
matching only the circuit index/id bytes without validating the source
callsign against the socket's dest_addr. Any node can inject frames into
an existing STATE_3 connection by guessing the circuit ID (the value space
is only 65025 non-zero pairs and IDs are assigned sequentially). Combined
with the fraglen overflow in patch 1, this gives an unauthenticated
attacker a complete heap corruption primitive.
Patch 3 fixes an out-of-bounds read in rose_parse_ccitt(): the function
validates 10 <= l <= 20 but never checks that the remaining buffer is at
least l+2 bytes before calling memcpy(). rose_parse_national() already
performs the equivalent check; this patch adds the same guard.
Mashiro Chen (3):
net: netrom: fix integer overflow in nr_queue_rx_frame()
net: netrom: validate source address in nr_find_socket()
net: rose: fix out-of-bounds read in rose_parse_ccitt()
net/netrom/af_netrom.c | 11 +++++++----
net/netrom/nr_in.c | 10 ++++++++++
net/rose/rose_subr.c | 3 +++
3 files changed, 20 insertions(+), 4 deletions(-)
--
2.53.0
next reply other threads:[~2026-04-07 17:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 17:15 Mashiro Chen [this message]
2026-04-07 17:15 ` [PATCH 1/3] net: netrom: fix integer overflow in nr_queue_rx_frame() Mashiro Chen
2026-04-07 17:15 ` [PATCH 2/3] net: netrom: validate source address in nr_find_socket() Mashiro Chen
2026-04-07 17:16 ` [PATCH 3/3] net: rose: fix out-of-bounds read in rose_parse_ccitt() Mashiro Chen
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=20260407171600.102988-1-mashiro.chen@mailbox.org \
--to=mashiro.chen@mailbox.org \
--cc=ben@decadent.org.uk \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=horms@kernel.org \
--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 \
--cc=stable@vger.kernel.org \
/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