In the Linux kernel, the following vulnerability has been resolved: lib/scatterlist: fix length calculations in extract_kvec_to_sg Patch series "Fix bugs in extract_iter_to_sg()", v3. Fix bugs in the kvec and user variants of extract_iter_to_sg. This series is growing due to useful remarks made by sashiko.dev. The main bugs are: - The length for an sglist entry when extracting from a kvec can exceed the number of bytes in the page. This is obviously not intended. - When extracting a user buffer the sglist is temporarily used as a scratch buffer for extracted page pointers. If the sglist already contains some elements this scratch buffer could overlap with existing entries in the sglist. The series adds test cases to the kunit_iov_iter test that demonstrate all of these bugs. Additionally, there is a memory leak fix for the test itself. The bugs were orignally introduced into kernel v6.3 where the function lived in fs/netfs/iterator.c. It was later moved to lib/scatterlist.c in v6.5. Thus the actual fix is only marked for backports to v6.5+. This patch (of 5): When extracting from a kvec to a scatterlist, do not cross page boundaries. The required length was already calculated but not used as intended. Adjust the copied length if the loop runs out of sglist entries without extracting everything. While there, return immediately from extract_iter_to_sg if there are no sglist entries at all. A subsequent commit will add kunit test cases that demonstrate that the patch is necessary.
In the Linux kernel, the following vulnerability has been resolved: lib/scatterlist: fix length calculations in extract_kvec_to_sg Patch series "Fix bugs in extract_iter_to_sg()", v3. Fix bugs in the kvec and user variants of extract_iter_to_sg. This series is growing due to useful remarks made by sashiko.dev. The main bugs are: - The length for an sglist entry when extracting from a kvec can exceed the number of bytes in the page. This is obviously not intended. - When extracting a user buffer the sglist is temporarily used as a scratch buffer for extracted page pointers. If the sglist already contains some elements this scratch buffer could overlap with existing entries in the sglist. The series adds test cases to the kunit_iov_iter test that demonstrate all of these bugs. Additionally, there is a memory leak fix for the test itself. The bugs were orignally introduced into kernel v6.3 where the function lived in fs/netfs/iterator.c. It was later moved to lib/scatterlist.c in v6.5. Thus the actual fix is only marked for backports to v6.5+. This patch (of 5): When extracting from a kvec to a scatterlist, do not cross page boundaries. The required length was already calculated but not used as intended. Adjust the copied length if the loop runs out of sglist entries without extracting everything. While there, return immediately from extract_iter_to_sg if there are no sglist entries at all. A subsequent commit will add kunit test cases that demonstrate that the patch is necessary.
Update Linux/Linux to 3f17500e86d730c76db638bb3ae52f9b5e496c76 if you use the affected versions. Test the change in a non-production environment first.
Local check
hol-guard supply-chain scanlib/scatterlist: fix length calculations in extract_kvec_to_sg affects Linux/Linux (generic), Linux/Linux (generic). Severity is critical. In the Linux kernel, the following vulnerability has been resolved: lib/scatterlist: fix length calculations in extract_kvec_to_sg Patch series "Fix bugs in extract_iter_to_sg()", v3. Fix bugs in the kvec and user variants of extract_iter_to_sg. This series is growing due to useful remarks made by sashiko.dev. The main bugs are: - The length for an sglist entry when extracting from a kvec can exceed the number of bytes in the page. This is obviously not intended. - When extracting a user buffer the sglist is temporarily used as a scratch buffer for extracted page pointers. If the sglist already contains some elements this scratch buffer could overlap with existing entries in the sglist. The series adds test cases to the kunit_iov_iter test that demonstrate all of these bugs. Additionally, there is a memory leak fix for the test itself. The bugs were orignally introduced into kernel v6.3 where the function lived in fs/netfs/iterator.c. It was later moved to lib/scatterlist.c in v6.5. Thus the actual fix is only marked for backports to v6.5+. This patch (of 5): When extracting from a kvec to a scatterlist, do not cross page boundaries. The required length was already calculated but not used as intended. Adjust the copied length if the loop runs out of sglist entries without extracting everything. While there, return immediately from extract_iter_to_sg if there are no sglist entries at all. A subsequent commit will add kunit test cases that demonstrate that the patch is necessary.
AI coding agents often install or upgrade packages automatically in generic. A critical vulnerability in a dependency can be pulled into a project through a normal install or update without a human reviewing the change, expanding the blast radius from a single package to every agent workspace that depends on it.
| Package | Affected range | Fixed version |
|---|---|---|
| Linux/Linuxgeneric | >=0185846975339a5c348373aa450a977f5242366b <3f17500e86d730c76db638bb3ae52f9b5e496c76 || >=0185846975339a5c348373aa450a977f5242366b <e5e22fc9963469e678c4f4bb38d26adcec107f1e || >=0185846975339a5c348373aa450a977f5242366b <8fbba6829057979149d1b37d65690c037f3ddf4d || >=0185846975339a5c348373aa450a977f5242366b <9d38756d0a93b66163554219fa9c3365f40c4035 || >=0185846975339a5c348373aa450a977f5242366b <07b7d66e65d9cfe6b9c2c34aa22cfcaac37a5c45 | 3f17500e86d730c76db638bb3ae52f9b5e496c76, e5e22fc9963469e678c4f4bb38d26adcec107f1e, 8fbba6829057979149d1b37d65690c037f3ddf4d, 9d38756d0a93b66163554219fa9c3365f40c4035, 07b7d66e65d9cfe6b9c2c34aa22cfcaac37a5c45 |
| Linux/Linuxgeneric | 6.3 | Not reported |
Fixed versions are reported by the source feed; confirm compatibility before updating.
Reported by CVE List V5 (cvelist).
HOL Guard can help your team review package activity against supported protection paths.
Explore HOL GuardUpdate Linux/Linux to 3f17500e86d730c76db638bb3ae52f9b5e496c76 if you use the affected versions. Test the change in a non-production environment first.
Local check
hol-guard supply-chain scanlib/scatterlist: fix length calculations in extract_kvec_to_sg affects Linux/Linux (generic), Linux/Linux (generic). Severity is critical. In the Linux kernel, the following vulnerability has been resolved: lib/scatterlist: fix length calculations in extract_kvec_to_sg Patch series "Fix bugs in extract_iter_to_sg()", v3. Fix bugs in the kvec and user variants of extract_iter_to_sg. This series is growing due to useful remarks made by sashiko.dev. The main bugs are: - The length for an sglist entry when extracting from a kvec can exceed the number of bytes in the page. This is obviously not intended. - When extracting a user buffer the sglist is temporarily used as a scratch buffer for extracted page pointers. If the sglist already contains some elements this scratch buffer could overlap with existing entries in the sglist. The series adds test cases to the kunit_iov_iter test that demonstrate all of these bugs. Additionally, there is a memory leak fix for the test itself. The bugs were orignally introduced into kernel v6.3 where the function lived in fs/netfs/iterator.c. It was later moved to lib/scatterlist.c in v6.5. Thus the actual fix is only marked for backports to v6.5+. This patch (of 5): When extracting from a kvec to a scatterlist, do not cross page boundaries. The required length was already calculated but not used as intended. Adjust the copied length if the loop runs out of sglist entries without extracting everything. While there, return immediately from extract_iter_to_sg if there are no sglist entries at all. A subsequent commit will add kunit test cases that demonstrate that the patch is necessary.
AI coding agents often install or upgrade packages automatically in generic. A critical vulnerability in a dependency can be pulled into a project through a normal install or update without a human reviewing the change, expanding the blast radius from a single package to every agent workspace that depends on it.
| Package | Affected range | Fixed version |
|---|---|---|
| Linux/Linuxgeneric | >=0185846975339a5c348373aa450a977f5242366b <3f17500e86d730c76db638bb3ae52f9b5e496c76 || >=0185846975339a5c348373aa450a977f5242366b <e5e22fc9963469e678c4f4bb38d26adcec107f1e || >=0185846975339a5c348373aa450a977f5242366b <8fbba6829057979149d1b37d65690c037f3ddf4d || >=0185846975339a5c348373aa450a977f5242366b <9d38756d0a93b66163554219fa9c3365f40c4035 || >=0185846975339a5c348373aa450a977f5242366b <07b7d66e65d9cfe6b9c2c34aa22cfcaac37a5c45 | 3f17500e86d730c76db638bb3ae52f9b5e496c76, e5e22fc9963469e678c4f4bb38d26adcec107f1e, 8fbba6829057979149d1b37d65690c037f3ddf4d, 9d38756d0a93b66163554219fa9c3365f40c4035, 07b7d66e65d9cfe6b9c2c34aa22cfcaac37a5c45 |
| Linux/Linuxgeneric | 6.3 | Not reported |
Fixed versions are reported by the source feed; confirm compatibility before updating.
Reported by CVE List V5 (cvelist).
HOL Guard can help your team review package activity against supported protection paths.
Explore HOL Guard