Descripción
En el Linux kernel se ha resuelto la siguiente vulnerabilidad: smb: client: restore the data_offset bound in is_valid_oplock_break() El commit 83bfbd0bb902 ("cifs: Remove the RFC1002 header from smb_hdr") cambió la magnitud contra la que se mide este límite. Antes era srv->total_read menos el preámbulo RFC1002 de 4 bytes que total_read incluía entonces, por lo que correspondía a la longitud del mensaje SMB. El mismo commit dejó de contar el preámbulo, y la sustitución mecánica por srv->total_read - srv->pdu_size dejó una expresión que es idénticamente cero: standard_receive3() lee MID_HEADER_SIZE() bytes y luego exactamente pdu_length - MID_HEADER_SIZE() más, sumando ambos a total_read. Por lo tanto, len es 0, la resta que sigue da la vuelta y ningún DataOffset __u32 puede superar el resultado, de modo que la comprobación del commit 097f5863b1a0 ("cifs: read overflow in is_valid_oplock_break()") ya no rechaza nada. Se usa total_read, que ahora es por sí solo la longitud del mensaje.
Qué hacer
Revisa si usas el producto afectado y en qué versión, y aplica la actualización o la mitigación que indique el aviso del fabricante. CISA no ha confirmado que se esté explotando; si eso cambia, esta ficha pasa a «explotada» y te avisamos en el boletín.
Versiones afectadas
- Linux Afectadas: 83bfbd0bb9025f98fa62b44f93bd67466773d1db y anteriores a 5b16a1967a01ad4496a7206a87c3eb16f1df2b05 · 83bfbd0bb9025f98fa62b44f93bd67466773d1db y anteriores a ba22f575de9deeae4ae0859ca4315a7698226237 · 78e718c5aa146063cd70d2cc68297c3ac41f31ee · 6.18.56 y anteriores a 6.19
- Linux Afectadas: 6.19 No afectadas: 7.2.4 · 7.3
Según el registro de la vulnerabilidad en CVE.org, tal como lo publicó el fabricante. Confirma tu versión exacta en el aviso del fabricante.
Referencias
- Referencia en git.kernel.orggit.kernel.org/stable/c/5b16a1967a01ad4496a7206a87c3eb16f1df2b05
- Referencia en git.kernel.orggit.kernel.org/stable/c/ba22f575de9deeae4ae0859ca4315a7698226237
Ver el texto original en inglés (CVE.org)
smb: client: restore the data_offset bound in is_valid_oplock_break()
In the Linux kernel, the following vulnerability has been resolved: smb: client: restore the data_offset bound in is_valid_oplock_break() Commit 83bfbd0bb902 ("cifs: Remove the RFC1002 header from smb_hdr") changed the quantity this bound is measured against. It used to be srv->total_read minus the 4-byte RFC1002 preamble that total_read then included, so it was the SMB message length. The same commit stopped counting the preamble, and the mechanical substitution to srv->total_read - srv->pdu_size left an expression that is identically zero: standard_receive3() reads MID_HEADER_SIZE() bytes and then exactly pdu_length - MID_HEADER_SIZE() more, adding both to total_read. len is therefore 0, the subtraction below it wraps, and no __u32 DataOffset can exceed the result, so the check from commit 097f5863b1a0 ("cifs: read overflow in is_valid_oplock_break()") no longer rejects anything. Use total_read, which is now the message length on its own.