]> git.ipfire.org Git - thirdparty/linux.git/commit
net: hsr: fix potential OOB access in supervision frame handling
authorLuka Gejak <luka.gejak@linux.dev>
Sat, 23 May 2026 13:03:30 +0000 (15:03 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 25 May 2026 21:18:15 +0000 (14:18 -0700)
commitf229426072fc865654a60978bb7fda790a051ff3
tree8d915853b4818ad5467d095bc811d7e532356fd8
parent2156a29aecfffa2eb7c558255690084efbe9f3b0
net: hsr: fix potential OOB access in supervision frame handling

Ensure the entire TLV header is linearized before access by adding
sizeof(struct hsr_sup_tlv) to the pskb_may_pull() calls. Without this,
a truncated frame could cause an out-of-bounds access.

Fixes: eafaa88b3eb7 ("net: hsr: Add support for redbox supervision frames")
Signed-off-by: Luka Gejak <luka.gejak@linux.dev>
Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de>
Link: https://patch.msgid.link/20260523130330.61880-1-luka.gejak@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/hsr/hsr_forward.c