# CVE-2024-38661: s390/ap: Fix crash in AP internal function modify\_bitmap()

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-190
- **Published:** 2024-06-25T14:22:38.224Z
- **Modified:** 2026-06-17T07:40:49.377Z

## Who should check

- Anyone running Linux \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 2062e3f1f2374102f8014d7ca286b9aa527bd558; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 7c72af16abf2ec7520407098360bbba312289e05; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 7360cef95aa1ea2b5efb7b5e2ed32e941664e1f0; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 67011123453b91ec03671d40712fa213e94a01b9; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 8c5f5911c1b13170d3404eb992c6a0deaa8d81ad; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 4c0bfb4e867c1ec6616a5049bd3618021e127056; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 7dabe54a016defe11bb2a278cd9f1ff6db3feba6; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< d4f9d5a99a3fd1b1c691b7a1a6f8f3f25f4116c9
- Anyone running Linux 4.19

## Description

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

s390/ap: Fix crash in AP internal function modify\_bitmap()

A system crash like this

  Failing address: 200000cb7df6f000 TEID: 200000cb7df6f403
  Fault in home space mode while using kernel ASCE.
  AS:00000002d71bc007 R3:00000003fe5b8007 S:000000011a446000 P:000000015660c13d
  Oops: 0038 ilc:3 \[\#1\] PREEMPT SMP
  Modules linked in: mlx5\_ib ...
  CPU: 8 PID: 7556 Comm: bash Not tainted 6.9.0-rc7 \#8
  Hardware name: IBM 3931 A01 704 (LPAR)
  Krnl PSW : 0704e00180000000 0000014b75e7b606 (ap\_parse\_bitmap\_str+0x10e/0x1f8)
  R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3
  Krnl GPRS: 0000000000000001 ffffffffffffffc0 0000000000000001 00000048f96b75d3
  000000cb00000100 ffffffffffffffff ffffffffffffffff 000000cb7df6fce0
  000000cb7df6fce0 00000000ffffffff 000000000000002b 00000048ffffffff
  000003ff9b2dbc80 200000cb7df6fcd8 0000014bffffffc0 000000cb7df6fbc8
  Krnl Code: 0000014b75e7b5fc: a7840047            brc     8,0000014b75e7b68a
  0000014b75e7b600: 18b2                lr      %r11,%r2
  \#0000014b75e7b602: a7f4000a            brc     15,0000014b75e7b616
  \>0000014b75e7b606: eb22d00000e6        laog    %r2,%r2,0(%r13)
  0000014b75e7b60c: a7680001            lhi     %r6,1
  0000014b75e7b610: 187b                lr      %r7,%r11
  0000014b75e7b612: 84960021            brxh    %r9,%r6,0000014b75e7b654
  0000014b75e7b616: 18e9                lr      %r14,%r9
  Call Trace:
  \[\<0000014b75e7b606\>\] ap\_parse\_bitmap\_str+0x10e/0x1f8
  (\[\<0000014b75e7b5dc\>\] ap\_parse\_bitmap\_str+0xe4/0x1f8)
  \[\<0000014b75e7b758\>\] apmask\_store+0x68/0x140
  \[\<0000014b75679196\>\] kernfs\_fop\_write\_iter+0x14e/0x1e8
  \[\<0000014b75598524\>\] vfs\_write+0x1b4/0x448
  \[\<0000014b7559894c\>\] ksys\_write+0x74/0x100
  \[\<0000014b7618a440\>\] \_\_do\_syscall+0x268/0x328
  \[\<0000014b761a3558\>\] system\_call+0x70/0x98
  INFO: lockdep is turned off.
  Last Breaking-Event-Address:
  \[\<0000014b75e7b636\>\] ap\_parse\_bitmap\_str+0x13e/0x1f8
  Kernel panic - not syncing: Fatal exception: panic\_on\_oops

occured when /sys/bus/ap/a\[pq\]mask was updated with a relative mask value
(like +0x10-0x12,+60,-90) with one of the numeric values exceeding INT\_MAX.

The fix is simple: use unsigned long values for the internal variables. The
correct checks are already in place in the function but a simple int for
the internal variables was used with the possibility to overflow.

## Affected and fixed versions

- Linux: \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 2062e3f1f2374102f8014d7ca286b9aa527bd558; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 7c72af16abf2ec7520407098360bbba312289e05; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 7360cef95aa1ea2b5efb7b5e2ed32e941664e1f0; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 67011123453b91ec03671d40712fa213e94a01b9; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 8c5f5911c1b13170d3404eb992c6a0deaa8d81ad; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 4c0bfb4e867c1ec6616a5049bd3618021e127056; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 7dabe54a016defe11bb2a278cd9f1ff6db3feba6; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< d4f9d5a99a3fd1b1c691b7a1a6f8f3f25f4116c9 (cvelist)
- Linux: 4.19 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-38661.md
Affected: Linux >= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, < 2062e3f1f2374102f8014d7ca286b9aa527bd558; >= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, < 7c72af16abf2ec7520407098360bbba312289e05; >= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, < 7360cef95aa1ea2b5efb7b5e2ed32e941664e1f0; >= 3d8f60d38e249f989a7fca9…
Fixed in: Linux 2062e3f1f2374102f8014d7ca286b9aa527bd558, Linux 7c72af16abf2ec7520407098360bbba312289e05, Linux 7360cef95aa1ea2b5efb7b5e2ed32e941664e1f0, Linux 67011123453b91ec03671d40712fa213e94a01b9, Linux 8c5f5911c1b13170d3404eb992c6a0deaa8d81ad, Linux 4c0bfb4e867c1ec6616a5049bd3618021e127056, Linux 7dabe…

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-2024-38661 being exploited?

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

### How serious is CVE-2024-38661?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-38661?

Linux \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 2062e3f1f2374102f8014d7ca286b9aa527bd558; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 7c72af16abf2ec7520407098360bbba312289e05; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 7360cef95aa1ea2b5efb7b5e2ed32e941664e1f0; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 67011123453b91ec03671d40712fa213e94a01b9; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 8c5f5911c1b13170d3404eb992c6a0deaa8d81ad; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 4c0bfb4e867c1ec6616a5049bd3618021e127056; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< 7dabe54a016defe11bb2a278cd9f1ff6db3feba6; \>= 3d8f60d38e249f989a7fca9c2370c31c3d5487e1, \< d4f9d5a99a3fd1b1c691b7a1a6f8f3f25f4116c9; Linux 4.19.

### Is there a fix for CVE-2024-38661?

Yes. Fixed in Linux 2062e3f1f2374102f8014d7ca286b9aa527bd558, Linux 7c72af16abf2ec7520407098360bbba312289e05, Linux 7360cef95aa1ea2b5efb7b5e2ed32e941664e1f0, Linux 67011123453b91ec03671d40712fa213e94a01b9, Linux 8c5f5911c1b13170d3404eb992c6a0deaa8d81ad, Linux 4c0bfb4e867c1ec6616a5049bd3618021e127056, Linux 7dabe54a016defe11bb2a278cd9f1ff6db3feba6. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-38661?

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/2062e3f1f2374102f8014d7ca286b9aa527bd558>
- patch: <https://git.kernel.org/stable/c/7c72af16abf2ec7520407098360bbba312289e05>
- patch: <https://git.kernel.org/stable/c/7360cef95aa1ea2b5efb7b5e2ed32e941664e1f0>
- patch: <https://git.kernel.org/stable/c/67011123453b91ec03671d40712fa213e94a01b9>
- patch: <https://git.kernel.org/stable/c/8c5f5911c1b13170d3404eb992c6a0deaa8d81ad>
- patch: <https://git.kernel.org/stable/c/4c0bfb4e867c1ec6616a5049bd3618021e127056>
- patch: <https://git.kernel.org/stable/c/7dabe54a016defe11bb2a278cd9f1ff6db3feba6>
- patch: <https://git.kernel.org/stable/c/d4f9d5a99a3fd1b1c691b7a1a6f8f3f25f4116c9>

## 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-2024-38661>

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