# CVE-2023-53485: fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.25% (percentile 10, 2026-11-26)
- **CWE:** CWE-129
- **Published:** 2025-10-01T11:42:53.337Z
- **Modified:** 2026-08-05T09:14:20.042Z

## Who should check

- Anyone running Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 0d9e678a82915633b99603f744e7735d1a673d72; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 53b0a362aca2583729e8ca2936ca657ff3247d88; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 6e7d9d76e5654bcdd3cdb7c9441a8113428ecebb; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 911b48eec45152822bccf45cd3563b48256b1520; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 39f6292d75959e8accac0b3e24090094ba0824e9; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< bdf07ab1595b613b03f32dbb5cb379edfa1a7334; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< f2af019091f904ca08b3572ab0111238ad6d17b3; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 4e302336d5ca1767a06beee7596a72d3bdc8d983
- Anyone running Linux 2.6.12

## Description

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

fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev

Syzkaller reported the following issue:

UBSAN: array-index-out-of-bounds in fs/jfs/jfs\_dmap.c:1965:6
index -84 is out of range for type 's8\[341\]' (aka 'signed char\[341\]')
CPU: 1 PID: 4995 Comm: syz-executor146 Not tainted 6.4.0-rc6-syzkaller-00037-gb6dad5178cea \#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Call Trace:
 \<TASK\>
 \_\_dump\_stack lib/dump\_stack.c:88 \[inline\]
 dump\_stack\_lvl+0x1e7/0x2d0 lib/dump\_stack.c:106
 ubsan\_epilogue lib/ubsan.c:217 \[inline\]
 \_\_ubsan\_handle\_out\_of\_bounds+0x11c/0x150 lib/ubsan.c:348
 dbAllocDmapLev+0x3e5/0x430 fs/jfs/jfs\_dmap.c:1965
 dbAllocCtl+0x113/0x920 fs/jfs/jfs\_dmap.c:1809
 dbAllocAG+0x28f/0x10b0 fs/jfs/jfs\_dmap.c:1350
 dbAlloc+0x658/0xca0 fs/jfs/jfs\_dmap.c:874
 dtSplitUp fs/jfs/jfs\_dtree.c:974 \[inline\]
 dtInsert+0xda7/0x6b00 fs/jfs/jfs\_dtree.c:863
 jfs\_create+0x7b6/0xbb0 fs/jfs/namei.c:137
 lookup\_open fs/namei.c:3492 \[inline\]
 open\_last\_lookups fs/namei.c:3560 \[inline\]
 path\_openat+0x13df/0x3170 fs/namei.c:3788
 do\_filp\_open+0x234/0x490 fs/namei.c:3818
 do\_sys\_openat2+0x13f/0x500 fs/open.c:1356
 do\_sys\_open fs/open.c:1372 \[inline\]
 \_\_do\_sys\_openat fs/open.c:1388 \[inline\]
 \_\_se\_sys\_openat fs/open.c:1383 \[inline\]
 \_\_x64\_sys\_openat+0x247/0x290 fs/open.c:1383
 do\_syscall\_x64 arch/x86/entry/common.c:50 \[inline\]
 do\_syscall\_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd
RIP: 0033:0x7f1f4e33f7e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 \<48\> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc21129578 EFLAGS: 00000246 ORIG\_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1f4e33f7e9
RDX: 000000000000275a RSI: 0000000020000040 RDI: 00000000ffffff9c
RBP: 00007f1f4e2ff080 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1f4e2ff110
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 \</TASK\>

The bug occurs when the dbAllocDmapLev()function attempts to access
dp-\>tree.stree\[leafidx + LEAFIND\] while the leafidx value is negative.

To rectify this, the patch introduces a safeguard within the
dbAllocDmapLev() function. A check has been added to verify if leafidx is
negative. If it is, the function immediately returns an I/O error, preventing
any further execution that could potentially cause harm.

Tested via syzbot.

## Affected and fixed versions

- Linux: \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 0d9e678a82915633b99603f744e7735d1a673d72; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 53b0a362aca2583729e8ca2936ca657ff3247d88; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 6e7d9d76e5654bcdd3cdb7c9441a8113428ecebb; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 911b48eec45152822bccf45cd3563b48256b1520; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 39f6292d75959e8accac0b3e24090094ba0824e9; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< bdf07ab1595b613b03f32dbb5cb379edfa1a7334; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< f2af019091f904ca08b3572ab0111238ad6d17b3; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 4e302336d5ca1767a06beee7596a72d3bdc8d983 (cvelist)
- Linux: 2.6.12 (cvelist)

## Mitigation

- Upgrade Linux to 4e302336d5ca1767a06beee7596a72d3bdc8d983 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-53485. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-53485.md
Affected: Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 0d9e678a82915633b99603f744e7735d1a673d72; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 53b0a362aca2583729e8ca2936ca657ff3247d88; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 6e7d9d76e5654bcdd3cdb7c9441a8113428ecebb; >= 1da177e4c3f41524e886b7f…
Fixed in: Linux 0d9e678a82915633b99603f744e7735d1a673d72, Linux 53b0a362aca2583729e8ca2936ca657ff3247d88, Linux 6e7d9d76e5654bcdd3cdb7c9441a8113428ecebb, Linux 911b48eec45152822bccf45cd3563b48256b1520, Linux 39f6292d75959e8accac0b3e24090094ba0824e9, Linux 4e302336d5ca1767a06beee7596a72d3bdc8d983

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-53485 being exploited?

There is no confirmed exploitation: CVE-2023-53485 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-53485?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-53485?

Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 0d9e678a82915633b99603f744e7735d1a673d72; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 53b0a362aca2583729e8ca2936ca657ff3247d88; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 6e7d9d76e5654bcdd3cdb7c9441a8113428ecebb; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 911b48eec45152822bccf45cd3563b48256b1520; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 39f6292d75959e8accac0b3e24090094ba0824e9; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< bdf07ab1595b613b03f32dbb5cb379edfa1a7334; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< f2af019091f904ca08b3572ab0111238ad6d17b3; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 4e302336d5ca1767a06beee7596a72d3bdc8d983; Linux 2.6.12.

### Is there a fix for CVE-2023-53485?

Yes. Fixed in Linux 0d9e678a82915633b99603f744e7735d1a673d72, Linux 53b0a362aca2583729e8ca2936ca657ff3247d88, Linux 6e7d9d76e5654bcdd3cdb7c9441a8113428ecebb, Linux 911b48eec45152822bccf45cd3563b48256b1520, Linux 39f6292d75959e8accac0b3e24090094ba0824e9, Linux 4e302336d5ca1767a06beee7596a72d3bdc8d983. Upgrade Linux to 4e302336d5ca1767a06beee7596a72d3bdc8d983 or later.

### How do I check if I'm affected by CVE-2023-53485?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/0d9e678a82915633b99603f744e7735d1a673d72>
- patch: <https://git.kernel.org/stable/c/53b0a362aca2583729e8ca2936ca657ff3247d88>
- patch: <https://git.kernel.org/stable/c/6e7d9d76e5654bcdd3cdb7c9441a8113428ecebb>
- patch: <https://git.kernel.org/stable/c/911b48eec45152822bccf45cd3563b48256b1520>
- patch: <https://git.kernel.org/stable/c/39f6292d75959e8accac0b3e24090094ba0824e9>
- patch: <https://git.kernel.org/stable/c/bdf07ab1595b613b03f32dbb5cb379edfa1a7334>
- patch: <https://git.kernel.org/stable/c/f2af019091f904ca08b3572ab0111238ad6d17b3>
- patch: <https://git.kernel.org/stable/c/4e302336d5ca1767a06beee7596a72d3bdc8d983>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-53485>

HTML: <https://flawdb.com/CVE-2023-53485> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-53485>
