CVE-2025-39887 tracing/osnoise: Fix null-ptr-deref in bitmap_parselist()

Medium 5.5 Published Updated

A local attacker can cause a kernel crash by writing zero bytes to the osnoise cpus debug file, leading to a denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-39887?

CVE-2025-39887 is a medium-severity vulnerability in Linux kernel, published on 23 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

tracing/osnoise: Fix null-ptr-deref in bitmap_parselist()

A crash was observed with the following output:

BUG: kernel NULL pointer dereference, address: 0000000000000010 Oops: Oops: 0000 [#1] SMP NOPTI CPU: 2 UID: 0 PID: 92 Comm: osnoise_cpus Not tainted 6.17.0-rc4-00201-gd69eb204c255 #138 PREEMPT(voluntary) RIP: 0010:bitmap_parselist+0x53/0x3e0 Call Trace: <TASK> osnoise_cpus_write+0x7a/0x190 vfs_write+0xf8/0x410 ? do_sys_openat2+0x88/0xd0 ksys_write+0x60/0xd0 do_syscall_64+0xa4/0x260 entry_SYSCALL_64_after_hwframe+0x77/0x7f </TASK>

This issue can be reproduced by below code:

fd=open("/sys/kernel/debug/tracing/osnoise/cpus", O_WRONLY); write(fd, "0-2", 0);

When user pass 'count=0' to osnoise_cpus_write(), kmalloc() will return ZERO_SIZE_PTR (16) and cpulist_parse() treat it as a normal value, which trigger the null pointer dereference. Add check for the parameter 'count'.

Weakness: CWE-476

Which versions are affected by CVE-2025-39887?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-39887?

Apply the vendor's patch.

Is CVE-2025-39887 being exploited?

There is no known exploitation of CVE-2025-39887 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-39887, DEBIAN-CVE-2025-39887, GHSA-jv32-9255-r9c9, UBUNTU-CVE-2025-39887.

Is CVE-2025-39887 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free