summaryrefslogtreecommitdiff
path: root/drivers/ide/ppc/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMashiro Chen <mashiro.chen@mailbox.org>2026-04-09 01:25:51 +0800
committerJakub Kicinski <kuba@kernel.org>2026-04-12 13:09:45 -0700
commit2835750dd6475a5ddc116be0b4c81fee8ce1a902 (patch)
tree78f4df812d477fe378971e1308bd971e8dcb390c /drivers/ide/ppc/git@git.tavy.me:linux.git
parentba69b788ed79d82ed4940fc8dbee9b3f9c5b1a88 (diff)
net: rose: reject truncated CLEAR_REQUEST frames in state machines
All five ROSE state machines (states 1-5) handle ROSE_CLEAR_REQUEST by reading the cause and diagnostic bytes directly from skb->data[3] and skb->data[4] without verifying that the frame is long enough: rose_disconnect(sk, ..., skb->data[3], skb->data[4]); The entry-point check in rose_route_frame() only enforces ROSE_MIN_LEN (3 bytes), so a remote peer on a ROSE network can send a syntactically valid but truncated CLEAR_REQUEST (3 or 4 bytes) while a connection is open in any state. Processing such a frame causes a one- or two-byte out-of-bounds read past the skb data, leaking uninitialized heap content as the cause/diagnostic values returned to user space via getsockopt(ROSE_GETCAUSE). Add a single length check at the rose_process_rx_frame() dispatch point, before any state machine is entered, to drop frames that carry the CLEAR_REQUEST type code but are too short to contain the required cause and diagnostic fields. Signed-off-by: Mashiro Chen <mashiro.chen@mailbox.org> Link: https://patch.msgid.link/20260408172551.281486-1-mashiro.chen@mailbox.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/ide/ppc/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions