CVE-2025-38255 Information
Description
In the Linux kernel the following vulnerability has been resolved:
lib/group_cpus: fix NULL pointer dereference from group_cpus_evenly()
While testing null_blk with configfs echo 0 > poll_queues will trigger following panic:
BUG: kernel NULL pointer dereference address: 0000000000000010
Oops: Oops: 0000 [1] SMP NOPTI
CPU: 27 UID: 0 PID: 920 Comm: bash Not tainted 6.15.0-02023-gadbdb95c8696-dirty 1238 PREEMPT(undef)
Hardware name: QEMU Standard PC (i440FX + PIIX 1996) BIOS 1.16.1-2.fc37 04/01/2014
RIP: 0010:__bitmap_or+0x48/0x70
Call Trace:
Root cause is that numgrps is set to 0 and ZERO_SIZE_PTR is returned from kcalloc() and later ZERO_SIZE_PTR will be deferenced.
Fix the problem by checking numgrps first in group_cpus_evenly() and return NULL directly if numgrps is zero.
[yukuai3@huawei.com: also fix the non-SMP version]
Reference
https://git.kernel.org/stable/c/29d39e0d5f16c060e32542b2cf351c09fd22b250 https://git.kernel.org/stable/c/64a99eff8dcf1f951a544e6058341b2b19a8fdbd https://git.kernel.org/stable/c/911ef2e8a7de5b2bae8ff11fb0bd01f699e6db65 https://git.kernel.org/stable/c/df831e97739405ecbaddb85516bc7d4d1c933d6b
Related CNNVD
CNNVD-202507-1297 (Published: 2025-07-09)
Share on: