Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: bpf: fix NULL pointer dereference in print_reg_state()
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1005368

Syzkaller reported a general protection fault due to a NULL pointer
dereference in print_reg_state() when accessing reg->map_ptr without
checking if it is NULL.

The existing code assumes reg->map_ptr is always valid before
dereferencing reg->map_ptr->name, reg->map_ptr->key_size, and
reg->map_ptr->value_size.

Fix this by adding explicit NULL checks before accessing reg->map_ptr
and its members. This prevents crashes when reg->map_ptr is NULL,
improving the robustness of the BPF verifier's verbose logging.

Reported-by: [email protected]
Signed-off-by: Brahmajit Das <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 348f611
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1005368
version: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants