В ядре Linux устранена следующая уязвимость:
NFSv4/pNFS: отклонить r_addr нулевой длины в nfs4_decode_mp_ds_addr
nfs4_decode_mp_ds_addr() декодирует непрозрачные объекты r_netid и r_addr
netaddr4 из тела multipath-DS GETDEVICEINFO, а затем немедленно
вызывает strrchr(buf, '.') для определения разделителя портов. Оба декодируют
используйте xdr_stream_decode_string_dup(), и проверяется только текущий код
«nlen < 0» / «rlen < 0» перед разыменованием возвращаемой строки. Когда непрозрачный объект имеет нулевую длину, xdr_stream_decode_opaque_inline()
возвращает 0, и xdr_stream_decode_string_dup() переходит к своему
"*str = NULL; return ret" хвост, оставляя buf NULL с возвращаемым значением
из 0.
Проверка «< 0» этого не улавливает, и следующая строка
strrchr(NULL, '.'), разыменование нулевого указателя ядра, доступное из
любой клиент pNFS-flexfile, установленный против вредоносного или скомпрометированного
сервер метаданных. Явно отклоняйте случаи нулевой длины, чтобы декодер не сработал с
-EBADMSG (рассматривается как неправильное тело GETDEVICEINFO) вместо
паникуя клиента.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: NFSv4/pNFS: reject zero-length r_addr in nfs4_decode_mp_ds_addr nfs4_decode_mp_ds_addr() decodes the r_netid and r_addr opaques of a netaddr4 from a GETDEVICEINFO multipath-DS body, then immediately calls strrchr(buf, '.') to locate the port separator. Both decodes use xdr_stream_decode_string_dup(), and the current code checks only "nlen < 0" / "rlen < 0" before dereferencing the returned string. When the on-wire opaque has length zero, xdr_stream_decode_opaque_inline() returns 0 and xdr_stream_decode_string_dup() falls through to its "*str = NULL; return ret" tail, leaving buf NULL with a return value of 0. The "< 0" check does not catch this, and the next line is strrchr(NULL, '.'), a kernel NULL pointer dereference reachable from any pNFS-flexfile client mounted against a malicious or compromised metadata server. Reject the zero-length cases explicitly so the decoder fails with -EBADMSG (treated as a malformed GETDEVICEINFO body) instead of panicking the client.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 7
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.0
|
5.15.211
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.0
|
6.1.177
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.0
|
6.6.144
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.0
|
6.12.95
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.0
|
6.18.38
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.0
|
7.1.3
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.0
|
7.2-rc1
|