-
Notifications
You must be signed in to change notification settings - Fork 152
bpf: Fix NULL deref in __list_del_clearprev for flush_node #10481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Upstream branch: 6f0b824 |
AI reviewed your patch. Please fix the bug or email reply why it's not a bug. In-Reply-To-Subject: |
|
Forwarding comment 3658573525 via email |
|
Upstream branch: 6f0b824 |
#syz test Hi, This patch fixes a NULL pointer dereference in the BPF subsystem that occurs when __list_del_clearprev() is called on an already-cleared flush_node list_head. The fix includes two parts: 1. Properly initialize the flush_node list_head during per-CPU bulk queue allocation using INIT_LIST_HEAD(&bq->flush_node) 2. Add defensive checks before calling __list_del_clearprev() to ensure the node is actually in the list by checking if (bq->flush_node.prev) According to the __list_del_clearprev documentation in include/linux/list.h, 'The code that uses this needs to check the node 'prev' pointer instead of calling list_empty()'. This patch fixes the following syzbot-reported issue: https://syzkaller.appspot.com/bug?extid=2b3391f44313b3983e91 Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=2b3391f44313b3983e91 Signed-off-by: DLpang <[email protected]> Reported-by: [email protected] Tested-by: [email protected]
120974c to
514c41a
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1033576 expired. Closing PR. |
Pull request for series with
subject: bpf: Fix NULL deref in __list_del_clearprev for flush_node
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1033576