NULL pointer dereference in libbpf

3 messages, 2 authors, 2021-06-18 · open the first message on its own page

NULL pointer dereference in libbpf

From: Anton Ivanov <hidden>
Date: 2021-06-18 09:14:22

https://elixir.bootlin.com/linux/latest/source/tools/lib/bpf/bpf.c#L91

A string is copied to a pointer destination which has been memset to zero a few lines above.

Brgds,

-- 
Anton R. Ivanov
https://www.kot-begemot.co.uk/

Re: NULL pointer dereference in libbpf

From: Toke Høiland-Jørgensen <hidden>
Date: 2021-06-18 09:25:08

Anton Ivanov [off-list ref] writes:
https://elixir.bootlin.com/linux/latest/source/tools/lib/bpf/bpf.c#L91

A string is copied to a pointer destination which has been memset to
zero a few lines above.
No, it isn't. attr.map_name is an array...

-Toke

Re: NULL pointer dereference in libbpf

From: Anton Ivanov <hidden>
Date: 2021-06-18 09:54:35


On 18/06/2021 10:24, Toke Høiland-Jørgensen wrote:
Anton Ivanov [off-list ref] writes:
quoted
https://elixir.bootlin.com/linux/latest/source/tools/lib/bpf/bpf.c#L91

A string is copied to a pointer destination which has been memset to
zero a few lines above.
No, it isn't. attr.map_name is an array...
Apologies, looking at the wrong struct definition (bpf_create_map_attr instead of bpf_attr).

Best Regards,
-Toke
-- 
Anton R. Ivanov
https://www.kot-begemot.co.uk/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help