Linux
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 83bfbd0bb9025f98fa62b44f93bd67466773d1db, < 5b16a1967a01ad4496a7206a87c3eb16f1df2b05
- >= 83bfbd0bb9025f98fa62b44f93bd67466773d1db, < ba22f575de9deeae4ae0859ca4315a7698226237
- 78e718c5aa146063cd70d2cc68297c3ac41f31ee
- >= 6.18.56, < 6.19
Fixed in 5b16a1967a01ad4496a7206a87c3eb16f1df2b05, ba22f575de9deeae4ae0859ca4315a7698226237, 6.19
- 6.19
Fixed in 0, 7.2.4, 7.3
Mitigation
Upgrade Linux to 5b16a1967a01ad4496a7206a87c3eb16f1df2b05 or ba22f575de9deeae4ae0859ca4315a7698226237 or 6.19 or later.
Upgrade Linux to 0 or 7.2.4 or 7.3 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.