Overview
About vulnerability
In the Linux kernel, the following vulnerability has been resolved:
scsi: target: iscsi: Reserve a terminator byte for the login payload
iscsi_target_check_login_request() rejects a login PDU whose DataSegmentLength exceeds MAX_KEY_VALUE_PAIRS, but the test is ‘>’ and login->req_buf is allocated with exactly MAX_KEY_VALUE_PAIRS bytes. Since iscsit_get_login_rx() receives payload_length + padding bytes, where
padding = ((-payload_length) & 3);
any payload_length from 8189 to 8192 fills the whole 8192 byte buffer. The write stays in bounds, but no byte is left for a NUL terminator.
The buffer is subsequently consumed as a C string. In the CHAP path chap_check_algorithm() calls kstrdup(a_str), and extract_param() calls strstr(in_buf, pattern) followed by strlen_semi(), none of which take a length. convert_null_to_semi() additionally rewrites every embedded NUL to ‘;’, so even a payload made of well formed NUL separated key=value records is left without a terminator. These walk past the end of the object into adjacent slab memory. It is reachable by an unauthenticated initiator against a portal configured for CHAP; when authentication is not required iscsi_login_zero_tsih_s2() rewrites AuthMethod to None and the CHAP path is never entered.
Allocate one extra byte. kzalloc() zeroes it and nothing ever writes to it, as every writer copies to offset 0 for at most MAX_KEY_VALUE_PAIRS bytes, so the buffer is always terminated.
Details
- Affected product:
- AlmaLinux 9.2 ESU , Amazon Linux 2 ELS , CentOS 7 ELS , CentOS 8.4 ELS , CentOS 8.5 ELS , CentOS Stream 8 ELS , CloudLinux 7 ELS , Debian 10 ELS , Debian 11 ELS , Oracle Linux 6 ELS , Oracle Linux 7 ELS , RHEL 7 ELS , TuxCare 9.6 ESU , TuxCare 9.8 ESU , Ubuntu 16.04 ELS , Ubuntu 18.04 ELS , Ubuntu 20.04 ELS
- Affected packages:
- linux @ 5.4.0 (+18 more)
Fixes
KernelCare state
Live-patch status from KernelCare for each operating system.
| Operating system | Status | Covered kernels |
|---|---|---|
| AlmaLinux 10 | Released |
79 kernels
|
| AlmaLinux 8 | In Rollout |
147 kernels
|
| AlmaLinux 9 | In Rollout |
145 kernels
|
| AlmaLinux 9.2 ESU | Planned | — |
| AlmaLinux 9.6 ESU | Released |
23 kernels
|
| CentOS 7 ELS | Released |
38 kernels
|
| CentOS 8 | In Rollout |
33 kernels
|
| CloudLinux OS 7h | In Rollout |
127 kernels
|
| CloudLinux OS 8 | In Rollout |
121 kernels
|
| Debian 12 | Released |
44 kernels
|
| Debian 13 | Planned | — |
| Oracle Linux 10 | Released |
63 kernels
|
| Oracle Linux 8 | In Rollout |
162 kernels
|
| Oracle Linux 9 | Released |
144 kernels
|
| RHEL 10 | Released |
80 kernels
|
| RHEL 8 | In Rollout |
163 kernels
|
| RHEL 9 | Released |
144 kernels
|
| Rocky Linux 10 | Released |
62 kernels
|
| Rocky Linux 8 | In Rollout |
123 kernels
|
| Rocky Linux 9 | In Rollout |
120 kernels
|
| Ubuntu 22.04 | Planned | — |
| Ubuntu 22.04 AWS | Planned | — |
| Ubuntu 22.04 Azure | Planned | — |
| Ubuntu 24.04 | Planned | — |
| Ubuntu 24.04 AWS | Planned | — |
| Ubuntu 26.04 | Planned | — |