Files
linux/kernel/bpf
Shardul Bankar f6fddc6df3 bpf: Fix memory leak in __lookup_instance error path
When __lookup_instance() allocates a func_instance structure but fails
to allocate the must_write_set array, it returns an error without freeing
the previously allocated func_instance. This causes a memory leak of 192
bytes (sizeof(struct func_instance)) each time this error path is triggered.

Fix by freeing 'result' on must_write_set allocation failure.

Fixes: b3698c356a ("bpf: callchain sensitive stack liveness tracking using CFG")
Reported-by: BPF Runtime Fuzzer (BRF)
Signed-off-by: Shardul Bankar <shardulsb08@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://patch.msgid.link/20251016063330.4107547-1-shardulsb08@gmail.com
2025-10-16 10:45:17 -07:00
..
2025-09-11 13:00:43 -07:00
2025-09-23 07:34:38 -07:00
2024-08-30 08:55:26 -07:00
2024-08-30 08:55:26 -07:00
2025-08-12 14:56:04 -07:00
2025-09-23 07:34:38 -07:00
2024-08-30 08:55:26 -07:00
2024-08-30 08:57:47 -07:00
2025-07-11 11:00:57 -07:00
2025-07-16 18:38:05 -07:00