Commit e7ca0485 authored by Eric Dumazet's avatar Eric Dumazet Committed by Yongqiang Liu
Browse files

net/packet: convert po->origdev to an atomic flag

stable inclusion
from stable-v4.19.283
commit 36a320c3e2fe960eb5eb56ee31c2a07f55d4000a
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7BZ5U


CVE: NA

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

[ Upstream commit ee5675ec ]

syzbot/KCAN reported that po->origdev can be read
while another thread is changing its value.

We can avoid this splat by converting this field
to an actual bit.

Following patches will convert remaining 1bit fields.

Fixes: 80feaacb ("[AF_PACKET]: Add option to return orig_dev to userspace.")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 925fad9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment