CVE-2024-38661
Severity CVSS v4.0:
Pending analysis
Type:
CWE-190
Integer Overflow or Wraparound
Publication date:
25/06/2024
Last modified:
03/09/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
s390/ap: Fix crash in AP internal function modify_bitmap()<br />
<br />
A system crash like this<br />
<br />
Failing address: 200000cb7df6f000 TEID: 200000cb7df6f403<br />
Fault in home space mode while using kernel ASCE.<br />
AS:00000002d71bc007 R3:00000003fe5b8007 S:000000011a446000 P:000000015660c13d<br />
Oops: 0038 ilc:3 [#1] PREEMPT SMP<br />
Modules linked in: mlx5_ib ...<br />
CPU: 8 PID: 7556 Comm: bash Not tainted 6.9.0-rc7 #8<br />
Hardware name: IBM 3931 A01 704 (LPAR)<br />
Krnl PSW : 0704e00180000000 0000014b75e7b606 (ap_parse_bitmap_str+0x10e/0x1f8)<br />
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<br />
Krnl GPRS: 0000000000000001 ffffffffffffffc0 0000000000000001 00000048f96b75d3<br />
000000cb00000100 ffffffffffffffff ffffffffffffffff 000000cb7df6fce0<br />
000000cb7df6fce0 00000000ffffffff 000000000000002b 00000048ffffffff<br />
000003ff9b2dbc80 200000cb7df6fcd8 0000014bffffffc0 000000cb7df6fbc8<br />
Krnl Code: 0000014b75e7b5fc: a7840047 brc 8,0000014b75e7b68a<br />
0000014b75e7b600: 18b2 lr %r11,%r2<br />
#0000014b75e7b602: a7f4000a brc 15,0000014b75e7b616<br />
>0000014b75e7b606: eb22d00000e6 laog %r2,%r2,0(%r13)<br />
0000014b75e7b60c: a7680001 lhi %r6,1<br />
0000014b75e7b610: 187b lr %r7,%r11<br />
0000014b75e7b612: 84960021 brxh %r9,%r6,0000014b75e7b654<br />
0000014b75e7b616: 18e9 lr %r14,%r9<br />
Call Trace:<br />
[] ap_parse_bitmap_str+0x10e/0x1f8<br />
([] ap_parse_bitmap_str+0xe4/0x1f8)<br />
[] apmask_store+0x68/0x140<br />
[] kernfs_fop_write_iter+0x14e/0x1e8<br />
[] vfs_write+0x1b4/0x448<br />
[] ksys_write+0x74/0x100<br />
[] __do_syscall+0x268/0x328<br />
[] system_call+0x70/0x98<br />
INFO: lockdep is turned off.<br />
Last Breaking-Event-Address:<br />
[] ap_parse_bitmap_str+0x13e/0x1f8<br />
Kernel panic - not syncing: Fatal exception: panic_on_oops<br />
<br />
occured when /sys/bus/ap/a[pq]mask was updated with a relative mask value<br />
(like +0x10-0x12,+60,-90) with one of the numeric values exceeding INT_MAX.<br />
<br />
The fix is simple: use unsigned long values for the internal variables. The<br />
correct checks are already in place in the function but a simple int for<br />
the internal variables was used with the possibility to overflow.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.19.316 (excluding) | |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.278 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.219 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.161 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.94 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.34 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.9.5 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/2062e3f1f2374102f8014d7ca286b9aa527bd558
- https://git.kernel.org/stable/c/4c0bfb4e867c1ec6616a5049bd3618021e127056
- https://git.kernel.org/stable/c/67011123453b91ec03671d40712fa213e94a01b9
- https://git.kernel.org/stable/c/7360cef95aa1ea2b5efb7b5e2ed32e941664e1f0
- https://git.kernel.org/stable/c/7c72af16abf2ec7520407098360bbba312289e05
- https://git.kernel.org/stable/c/7dabe54a016defe11bb2a278cd9f1ff6db3feba6
- https://git.kernel.org/stable/c/8c5f5911c1b13170d3404eb992c6a0deaa8d81ad
- https://git.kernel.org/stable/c/d4f9d5a99a3fd1b1c691b7a1a6f8f3f25f4116c9



