Podatność w sterowniku Soft-iWARP (siw) jądra Linux pozwala złośliwemu zdalnie połączonemu węzłowi iWARP na wywołanie przepełnienia liczby całkowitej ze znakiem poprzez spreparowane pole długości MPA w pakiecie FPDU. Skutkuje to odczytem ogromnych obszarów pamięci (use-after-free) bez jakiegokolwiek uwierzytelnienia.
▸ Pokaż oryginał (EN)
In the Linux kernel, the following vulnerability has been resolved: RDMA/siw: Reject MPA FPDU length underflow before signed receive math A malicious connected siw peer can send an iWARP FPDU whose MPA length field (c_hdr->mpa_len, 16 bit big-endian, peer-controlled) is smaller than the fixed DDP/RDMAP header for the announced opcode. Soft-iWARP parses the full header in siw_get_hdr() based on iwarp_pktinfo[opcode] .hdr_len, but never compares mpa_len against that header length. siw_tcp_rx_data() then derives srx->fpdu_part_rem = be16_to_cpu(mpa_len) - fpdu_part_rcvd + MPA_HDR_SIZE; where fpdu_part_rcvd equals iwarp_pktinfo[opcode].hdr_len at this point. For a tagged WRITE (hdr_len 16, MPA_HDR_SIZE 2) the smallest on-wire mpa_len of 0 yields fpdu_part_rem = -14, and any mpa_len below hdr_len - MPA_HDR_SIZE underflows to a negative int. The signed value then flows into siw_proc_write()/siw_proc_rresp() as bytes = min(srx->fpdu_part_rem, srx->skb_new); is handed to siw_check_mem() as an int len (whose interval check addr + len > mem->va + mem->len is satisfied for a valid base when len is negative), and reaches siw_rx_data() -> siw_rx_kva() / siw_rx_umem() -> skb_copy_bits() as a signed copy length. The header copy branch in skb_copy_bits() promotes that to size_t, producing a multi-gigabyte read. KASAN under a KUnit harness that drives the real kernel TCP receive path -- a loopback AF_INET socketpair, the malformed FPDU written via kernel_sendmsg, sk_data_ready firing in softirq, tcp_read_sock dispatching to siw_tcp_rx_data -- reports: BUG: KASAN: use-after-free in skb_copy_bits+0x284/0x480 Read of size 4294967295 at addr ffff888... Call Trace: skb_copy_bits siw_rx_kva siw_rx_data siw_check_mem siw_proc_write siw_tcp_rx_data __tcp_read_sock siw_qp_llp_data_ready tcp_data_ready tcp_data_queue Add the missing invariant at the earliest point where the peer header is fully assembled. iwarp_pktinfo[*].hdr_len - MPA_HDR_SIZE is exactly the value the siw transmitter uses as the minimum mpa_len for each opcode (drivers/infiniband/sw/siw/siw_qp.c:33), so this matches the protocol contract. Out-of-range FPDUs terminate the connection with TERM_ERROR_LAYER_LLP / LLP_ETYPE_MPA / LLP_ECODE_FPDU_START -- which is RFC 5044 Section 8 error code 3 ("Marker and ULPDU Length fields do not agree on the start of an FPDU"), the correct framing-error class for this inconsistency.
Sterownik siw parsuje nagłówek iWARP FPDU w funkcji siw_get_hdr() na podstawie długości nagłówka dla danego opcode, jednak nigdy nie porównuje pola mpa_len (16-bitowe, big-endian, kontrolowane przez zdalny węzeł) z tą długością. Gdy mpa_len jest mniejszy niż wymagana długość nagłówka, obliczenie fpdu_part_rem w siw_tcp_rx_data() daje wynik ujemny (np. -14 dla WRITE z mpa_len=0). Ujemna wartość typu int przepływa następnie do siw_proc_write() i siw_rx_kva()/siw_rx_umem(), gdzie trafia do skb_copy_bits() — po niejawnej konwersji na size_t ujemna wartość staje się wielogigabajtową długością odczytu. Powoduje to dostęp poza granicami pamięci (use-after-free), co potwierdzają raporty KASAN ze śladem wywołań: skb_copy_bits → siw_rx_kva → siw_proc_write → siw_tcp_rx_data.
Zdalny, nieuwierzytelniony atakujący może wywołać odczyt kilku gigabajtów pamięci jądra (use-after-free), co może prowadzić do ujawnienia wrażliwych danych z przestrzeni jądra, destabilizacji systemu lub potencjalnie do wykonania dowolnego kodu (RCE).
Należy zastosować patche dostępne u producenta zgodnie z referencjami (commity: 0ce1bc9e46ec, 1012896f4225, 14553be882d9, 33a8b5e971e2, 4a331582011d w repozytorium kernel.org). Do czasu aktualizacji zaleca się wyłączenie modułu siw (Soft-iWARP) na systemach, które nie wymagają tej funkcjonalności.
Jądro Linux z włączonym sterownikiem RDMA/siw (Soft-iWARP); dokładne wersje wskazane w referencjach producenta (commity patcha dostępne w repozytorium kernel.org).
Podatność została zweryfikowana za pomocą testu KUnit z wykorzystaniem loopback AF_INET socketpair i narzędzia KASAN, co potwierdza realność ścieżki exploitacji w środowisku jądra. Poprawka zamyka błąd na najwcześniejszym etapie, po kompletnym złożeniu nagłówka, odrzucając FPDU z błędną długością kodem błędu RFC 5044 Section 8 error code 3.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HLinux Kernel
OSLinux7.15.11 – 5.15.209 (bez)5.16 – 6.1.175 (bez)6.2 – 6.6.142 (bez)5.3 – 5.10.258 (bez)6.13 – 6.18.34 (bez)6.19 – 7.0.11 (bez)6.7 – 6.12.92 (bez)
Powiązane podatności
Type confusion w V8 (Google Chrome) — zdalne uszkodzenie sterty
Commvault Command Center – nieuwierzytelniony RCE przez path traversal w ZIP
RCE przez YAML deserialization w IBM Aspera Faspex
RCE w VMware Workspace ONE Access i Identity Manager poprzez server-side template injection
Command Injection w VMware Workspace One Access i Identity Manager