Commit 2abedb90 authored by Phillip Potter's avatar Phillip Potter Committed by Zheng Zengkai
Browse files

net: hsr: check skb can contain struct hsr_ethhdr in fill_frame_info

stable inclusion
from stable-5.10.39
commit 86587f35cba979c2d55376d08a9d553d846e84a5
bugzilla: 51881
CVE: NA

--------------------------------

[ Upstream commit 2e9f6093 ]

Check at start of fill_frame_info that the MAC header in the supplied
skb is large enough to fit a struct hsr_ethhdr, as otherwise this is
not a valid HSR frame. If it is too small, return an error which will
then cause the callers to clean up the skb. Fixes a KMSAN-found
uninit-value bug reported by syzbot at:
https://syzkaller.appspot.com/bug?id=f7e9b601f1414f814f7602a82b6619a8d80bce3f



Reported-by: default avatar <syzbot+e267bed19bfc5478fb33@syzkaller.appspotmail.com>
Signed-off-by: default avatarPhillip Potter <phil@philpotter.co.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 24ae53e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment