Commit 261c860a authored by Jeremy Cline's avatar Jeremy Cline Committed by Ziyang Xuan
Browse files

net: nfc: llcp: Add lock when modifying device list

mainline inclusion
from mainline-v6.6-rc5
commit dfc7f7a9
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I95B1R
CVE: CVE-2023-52524

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfc7f7a988dad34c3bf4c053124fb26aa6c5f916



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

The device list needs its associated lock held when modifying it, or the
list could become corrupted, as syzbot discovered.

Reported-and-tested-by: default avatar <syzbot+c1d0a03d305972dbbe14@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=c1d0a03d305972dbbe14


Signed-off-by: default avatarJeremy Cline <jeremy@jcline.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Fixes: 6709d4b7 ("net: nfc: Fix use-after-free caused by nfc_llcp_find_local")
Link: https://lore.kernel.org/r/20230908235853.1319596-1-jeremy@jcline.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
parent c38cc0a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment