Thread (8 messages) 8 messages, 3 authors, 2022-08-29

Re: [External] : Re: [PATCH] netfilter: ebtables: fix a NULL pointer dereference in ebt_do_table()

From: Harshit Mogalapalli <hidden>
Date: 2022-08-20 19:19:21
Also in: bridge, lkml, netfilter-devel

On 20/08/22 9:56 pm, Florian Westphal wrote:
Harshit Mogalapalli [off-list ref] wrote:
quoted
In ebt_do_table() function dereferencing 'private->hook_entry[hook]'
can lead to NULL pointer dereference. So add a check to prevent that.
Hi Florian,

Thanks a lot for checking the patch.
This looks incorrect, i.e. paperimg over the problem.
Okay.
If hook_entry[hook] is NULL, how did this make it to the eval loop?
When I run the reproducer and have 'private->hook_entry[hook]' printed, 
it was NULL, so thought of adding a NULL check to prevent the NULL 
dereference.

Attaching the C reproducer.

Regards,
Harshit

I guess ebtables lacks a sanity check on incoming ruleset?

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help