The iouring subsystem in the Linux kernel allowed the MAXRWCOUNT limit to be bypassed in the PROVIDEBUFFERS operation, which led to negative values being usedin memrw when reading /proc/<PID>/mem. This could be used to create a heap overflow leading to arbitrary code execution in the kernel. It was addressed via commit d1f82808877b ("iouring: truncate lengths larger than MAXRWCOUNT on provide buffers") (v5.13-rc1) and backported to the stable kernels in v5.12.4, v5.11.21, and v5.10.37. It was introduced in ddf0322db79c ("iouring: add IORINGOPPROVIDEBUFFERS") (v5.7-rc1).
[
{
"target": {
"function": "io_add_buffers",
"file": "fs/io_uring.c"
},
"id": "CVE-2021-3491-8f25fad0",
"deprecated": false,
"digest": {
"length": 514.0,
"function_hash": "291792848571166757709639848828601840418"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git@d1f82808877bb10d3deee7cf3374a4eb3fb582db",
"signature_version": "v1"
},
{
"target": {
"file": "fs/io_uring.c"
},
"id": "CVE-2021-3491-e643798f",
"deprecated": false,
"digest": {
"line_hashes": [
"95515890294316512062342039498508655901",
"148853127560684736220351027634902636130",
"133395320639063972706925774167551706156",
"214166113584108769641628372853850419645",
"86197092977958566967507517501584731734",
"323915710667435963053284023060864662599",
"127495154178153713560135420225155802785",
"121234607515435185087286043733299150870"
],
"threshold": 0.9
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git@d1f82808877bb10d3deee7cf3374a4eb3fb582db",
"signature_version": "v1"
}
]
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-3491.json"