Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-37807— bpf: Fix kmemleak warning for percpu hashmap

EPSS 0.04% · P13
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2025-37807

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
bpf: Fix kmemleak warning for percpu hashmap
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix kmemleak warning for percpu hashmap Vlad Poenaru reported the following kmemleak issue: unreferenced object 0x606fd7c44ac8 (size 32): backtrace (crc 0): pcpu_alloc_noprof+0x730/0xeb0 bpf_map_alloc_percpu+0x69/0xc0 prealloc_init+0x9d/0x1b0 htab_map_alloc+0x363/0x510 map_create+0x215/0x3a0 __sys_bpf+0x16b/0x3e0 __x64_sys_bpf+0x18/0x20 do_syscall_64+0x7b/0x150 entry_SYSCALL_64_after_hwframe+0x4b/0x53 Further investigation shows the reason is due to not 8-byte aligned store of percpu pointer in htab_elem_set_ptr(): *(void __percpu **)(l->key + key_size) = pptr; Note that the whole htab_elem alignment is 8 (for x86_64). If the key_size is 4, that means pptr is stored in a location which is 4 byte aligned but not 8 byte aligned. In mm/kmemleak.c, scan_block() scans the memory based on 8 byte stride, so it won't detect above pptr, hence reporting the memory leak. In htab_map_alloc(), we already have htab->elem_size = sizeof(struct htab_elem) + round_up(htab->map.key_size, 8); if (percpu) htab->elem_size += sizeof(void *); else htab->elem_size += round_up(htab->map.value_size, 8); So storing pptr with 8-byte alignment won't cause any problem and can fix kmemleak too. The issue can be reproduced with bpf selftest as well: 1. Enable CONFIG_DEBUG_KMEMLEAK config 2. Add a getchar() before skel destroy in test_hash_map() in prog_tests/for_each.c. The purpose is to keep map available so kmemleak can be detected. 3. run './test_progs -t for_each/hash_map &' and a kmemleak should be reported.
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于percpu指针未8字节对齐导致内存泄漏警告。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
LinuxLinux 824bd0ce6c7c43a9e1e210abf124958e54d88342 ~ 7758e308aeda1038aba1944f7302d34161b3effe -
LinuxLinux 4.6 -

II. Public POCs for CVE-2025-37807

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-37807

登录查看更多情报信息。

Same Patch Batch · Linux · 2025-05-08 · 33 CVEs total

CVE-2025-37817mcb: fix a double free bug in chameleon_parse_gdd()
CVE-2025-37833net/niu: Niu requires MSIX ENTRY_DATA fields touch before entry reads
CVE-2025-37834mm/vmscan: don't try to reclaim hwpoison folio
CVE-2025-37831cpufreq: apple-soc: Fix null-ptr-deref in apple_soc_cpufreq_get_rate()
CVE-2025-37830cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()
CVE-2025-37829cpufreq: scpi: Fix null-ptr-deref in scpi_cpufreq_get_rate()
CVE-2025-37828scsi: ufs: mcq: Add NULL check in ufshcd_mcq_abort()
CVE-2025-37826scsi: ufs: core: Add NULL check in ufshcd_mcq_compl_pending_transfer()
CVE-2025-37827btrfs: zoned: return EIO on RAID1 block group write pointer mismatch
CVE-2025-37825nvmet: fix out-of-bounds access in nvmet_enable_port
CVE-2025-37823net_sched: hfsc: Fix a potential UAF in hfsc_dequeue() too
CVE-2025-37824tipc: fix NULL pointer dereference in tipc_mon_reinit_self()
CVE-2025-37821sched/eevdf: Fix se->slice being set to U64_MAX and resulting crash
CVE-2025-37822riscv: uprobes: Add missing fence.i after building the XOL buffer
CVE-2025-37820xen-netfront: handle NULL returned by xdp_convert_buff_to_frame()
CVE-2025-37819irqchip/gic-v2m: Prevent use after free of gicv2m_get_fwnode()
CVE-2025-37800driver core: fix potential NULL pointer dereference in dev_uevent()
CVE-2025-37818LoongArch: Return NULL from huge_pte_offset() for invalid PMD
CVE-2025-37816mei: vsc: Fix fortify-panic caused by invalid counted_by() use
CVE-2025-37815misc: microchip: pci1xxxx: Fix Kernel panic during IRQ handler registration

Showing top 20 of 33 CVEs. View all on vendor page → →

IV. Related Vulnerabilities

V. Comments for CVE-2025-37807

No comments yet


Leave a comment