<feed xmlns='http://www.w3.org/2005/Atom'>
<title>laptop-kernel/tools/testing/selftests/bpf/prog_tests/test_map_uninit.c, branch master</title>
<subtitle>Linux kernel tree for laptop</subtitle>
<id>https://git.zx2c4.com/laptop-kernel/atom/tools/testing/selftests/bpf/prog_tests/test_map_uninit.c?h=master</id>
<link rel='self' href='https://git.zx2c4.com/laptop-kernel/atom/tools/testing/selftests/bpf/prog_tests/test_map_uninit.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/'/>
<updated>2026-07-01T18:27:37Z</updated>
<entry>
<title>selftests/bpf: Verify no non-zeroed kernel heap memory exposure</title>
<updated>2026-07-01T18:27:37Z</updated>
<author>
<name>Leon Hwang</name>
<email>leon.hwang@linux.dev</email>
</author>
<published>2026-06-24T15:51:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=163944262f8646bf3a1eec557b6aff1f38582a9f'/>
<id>urn:sha1:163944262f8646bf3a1eec557b6aff1f38582a9f</id>
<content type='text'>
When lookup element from those per-CPU maps, which have special field
in their values and their value size is not equal to roundup(value_sz, 8),
the padding size of temporary non-zeroed kernel heap memory allocated by
kvmalloc should not be exposed to user space.

Without the fix:

test_map_uninit_mem_exposure:FAIL:zeroed tail bytes unexpected memory mismatch
actual:
	2B 2B 2B 2B
expected:
	00 00 00 00

Assisted-by: Codex:gpt-5.5

Signed-off-by: Leon Hwang &lt;leon.hwang@linux.dev&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20260624155115.85196-3-leon.hwang@linux.dev
</content>
</entry>
</feed>
