RDMA/siw: Bound fragmented header copies by the remaining length
- Published
- Last modified
- Status
- published
- Known exploitation
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.271, 5.15.222, 5.5, 5.20, 6.1, and 5 more
- Public exploit
- None on Exploit-DB
Summary
In the Linux kernel, the following vulnerability has been resolved: RDMA/siw: Bound fragmented header copies by the remaining length siw_get_hdr() can receive an extended DDP/RDMAP header across more than one TCP callback. The first callback may receive most of the header, while the next one still limits the copy to hdrlen - MIN_DDP_HDR instead of the number of missing bytes. This makes the destination move past the end of the header and overwrite the receive state, including fpdu_part_rcvd. A later callback can then use a negative fpdu_part_rcvd value as a copy offset, which creates an OOB write. Use the number of header bytes already received when calculating the next copy length.
Affected versions
- Linux Linux
From e3917c85f41ef1df64e27dc0e46ab0d803c5e73e · fixed in 2c6fbcf4bfac0b2b186acc8d91154c0fa24468a7; From 308cd50f174c95a507527037f4de1a0396aa4325 · fixed in af9f5b474a260ad23ffb9793d716a5e3bbce3b48; From 754209850df8367c954ac1de7671c7430b1f342c · fixed in 262dcd809723723ed8a4e05437ec7e9c21a8f17e; From 754209850df8367c954ac1de7671c7430b1f342c · fixed in eb4d7a946970469b3ab0c762432bf161d5b0836c; From 754209850df8367c954ac1de7671c7430b1f342c · fixed in 8628f8ebf41669302513fb3f0bf0eba38b226742; From 754209850df8367c954ac1de7671c7430b1f342c · fixed in b72dcfb9bf1f0f0147cda03dc59e4002a315067f; From 754209850df8367c954ac1de7671c7430b1f342c · fixed in e6bdfdf3bcb02d0d626a45e8c98b7e63d2fddf9d; From 754209850df8367c954ac1de7671c7430b1f342c · fixed in 9ff797e516dbc1ecb73701ec4c24055712d44411; From 5.10.150 · fixed in 5.10.271; From 5.15.75 · fixed in 5.15.222; From 5.4.220 · fixed in 5.5; From 5.19.17 · fixed in 5.20; From 6.0.3 · fixed in 6.1
- Linux Linux
6.1
- KernelLinux
fixed in 5.10.271; From 5.11.0 · fixed in 5.15.222; From 5.16.0 · fixed in 6.1.189; From 6.1.0 · fixed in 6.6.158; From 6.2.0 · fixed in 6.12.112; From 6.7.0 · fixed in 6.18.54; From 6.13.0 · fixed in 7.2.8
References 8
git.kernel.org
- stable/c/2c6fbcf4bfac0b2b186acc8d91154c0fa24468a7
- stable/c/af9f5b474a260ad23ffb9793d716a5e3bbce3b48
- stable/c/262dcd809723723ed8a4e05437ec7e9c21a8f17e
- stable/c/eb4d7a946970469b3ab0c762432bf161d5b0836c
- stable/c/8628f8ebf41669302513fb3f0bf0eba38b226742
- stable/c/b72dcfb9bf1f0f0147cda03dc59e4002a315067f
- stable/c/e6bdfdf3bcb02d0d626a45e8c98b7e63d2fddf9d
- stable/c/9ff797e516dbc1ecb73701ec4c24055712d44411