CVE-2025-38203: jfs: Fix null-ptr-deref in jfs_ioc_trim

Published Jul 4, 2025
·
Updated

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

jfs: Fix null-ptr-deref in jfsioctrim

[ Syzkaller Report ]

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000087: 0000 [#1 KASAN: null-ptr-deref in range [0x0000000000000438-0x000000000000043f] CPU: 2 UID: 0 PID: 10614 Comm: syz-executor.0 Not tainted 6.13.0-rc6-gfbfd64d25c7a-dirty #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Schedext: serialise (enabled+all), task: runnableat=-30ms RIP: 0010:jfsioctrim+0x34b/0x8f0 Code: e7 e8 59 a4 87 fe 4d 8b 24 24 4d 8d bc 24 38 04 00 00 48 8d 93 90 82 fe ff 4c 89 ff 31 f6 RSP: 0018:ffffc900055f7cd0 EFLAGS: 00010206 RAX: 0000000000000087 RBX: 00005866a9e67ff8 RCX: 000000000000000a RDX: 0000000000000001 RSI: 0000000000000004 RDI: 0000000000000001 RBP: dffffc0000000000 R08: ffff88807c180003 R09: 1ffff1100f830000 R10: dffffc0000000000 R11: ffffed100f830001 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000438 FS: 00007fe520225640(0000) GS:ffff8880b7e80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005593c91b2c88 CR3: 000000014927c000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? diebody+0x61/0xb0 ? dieaddr+0xb1/0xe0 ? excgeneralprotection+0x333/0x510 ? asmexcgeneralprotection+0x26/0x30 ? jfsioctrim+0x34b/0x8f0 jfsioctl+0x3c8/0x4f0 ? pfxjfsioctl+0x10/0x10 ? pfxjfsioctl+0x10/0x10 sesysioctl+0x269/0x350 ? pfxsesysioctl+0x10/0x10 ? dosyscall64+0xfb/0x210 dosyscall64+0xee/0x210 ? syscallexittousermode+0x1e0/0x330 entrySYSCALL64afterhwframe+0x77/0x7f RIP: 0033:0x7fe51f4903ad Code: c3 e8 a7 2b 00 00 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d RSP: 002b:00007fe5202250c8 EFLAGS: 00000246 ORIGRAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fe51f5cbf80 RCX: 00007fe51f4903ad RDX: 0000000020000680 RSI: 00000000c0185879 RDI: 0000000000000005 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe520225640 R13: 000000000000000e R14: 00007fe51f44fca0 R15: 00007fe52021d000 </TASK> Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:jfsioctrim+0x34b/0x8f0 Code: e7 e8 59 a4 87 fe 4d 8b 24 24 4d 8d bc 24 38 04 00 00 48 8d 93 90 82 fe ff 4c 89 ff 31 f6 RSP: 0018:ffffc900055f7cd0 EFLAGS: 00010206 RAX: 0000000000000087 RBX: 00005866a9e67ff8 RCX: 000000000000000a RDX: 0000000000000001 RSI: 0000000000000004 RDI: 0000000000000001 RBP: dffffc0000000000 R08: ffff88807c180003 R09: 1ffff1100f830000 R10: dffffc0000000000 R11: ffffed100f830001 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000438 FS: 00007fe520225640(0000) GS:ffff8880b7e80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005593c91b2c88 CR3: 000000014927c000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Kernel panic - not syncing: Fatal exception

[ Analysis ]

We believe that we have found a concurrency bug in the fs/jfs module that results in a null pointer dereference. There is a closely related issue which has been fixed:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d6c1b3599b2feb5c7291f5ac3a36e5fa7cedb234

... but, unfortunately, the accepted patch appears to still be susceptible to a null pointer dereference under some interleavings.

To trigger the bug, we think that JFSSBI(ipbmap->isb)->bmap is set to NULL in dbFreeBits and then dereferenced in jfsioctrim. This bug manifests quite rarely under normal circumstances, but is triggereable from a syz-program.

Affected Software

6 affected components
Linux Linux kernel
Linux Linux kernel>=3.7<5.4.295
Linux Linux kernel>=5.5<5.10.239
Linux Linux kernel>=5.11<5.15.186
Linux Linux kernel>=5.16<6.15.4
Debian Debian Linux=11.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch d6c1b3599b2feb5c7291f5ac3a36e5fa7cedb234
  2. Compensating control

    If practical while patching, mitigate the attack surface by restricting/monitoring access to the JFS ioctl entry point (jfs_ioctl/jfs_ioc_trim via the ioctl syscall) so untrusted processes cannot reliably trigger the null-ptr-deref under concurrency.

Event History

Jul 4, 2025
CVE Published
via MITRE·01:37 PM
Data Sourced
via MITRE·01:37 PM
Description
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-38203?

CVE-2025-38203 is classified as a moderate severity vulnerability affecting the Linux kernel.

2

How do I fix CVE-2025-38203?

To fix CVE-2025-38203, update to the patched version of the Linux kernel provided by your distribution.

3

What components are affected by CVE-2025-38203?

CVE-2025-38203 affects the jfs component of the Linux kernel.

4

What impact does CVE-2025-38203 have on system security?

CVE-2025-38203 can lead to a general protection fault, potentially allowing for a denial of service condition.

5

Is CVE-2025-38203 present in all versions of the Linux kernel?

No, CVE-2025-38203 is not present in all versions; it has been addressed in specific updates of the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203