In the Linux kernel, the following vulnerability has been resolved:
dm integrity: fix memory corruption when tag_size is less than digest size
It is possible to set up dm-integrity in such a way that the "tagsize" parameter is less than the actual digest size. In this situation, a part of the digest beyond tagsize is ignored.
In this case, dm-integrity would write beyond the end of the ic->recalctags array and corrupt memory. The corruption happened in integrityrecalc->integritysectorchecksum->cryptoshashfinal.
Fix this corruption by increasing the tags array so that it has enough padding at the end to accomodate the loop in integrity_recalc() being able to write a full digest size for the last member of the tags array.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49044.json",
"cna_assigner": "Linux"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49044.json"
[
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"52856859356142990491971706355273838834",
"53787430387654165943701788114929381376",
"202576271748034535749986379990953655227",
"145411653850818000843842441587772669566",
"289959025375707022840012519930285440675",
"258316069174892209576071784847856954958",
"180188258111482902763457976698533087412",
"209692000431492321765809730753209455593",
"137717377397409733888452864077461733473"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6b4bf97587ef6c1927a78934b700204920655123",
"signature_type": "Line",
"id": "CVE-2022-49044-16ee6544",
"target": {
"file": "drivers/md/dm-integrity.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "150747781096872836263303956227464784917",
"length": 17056.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6b4bf97587ef6c1927a78934b700204920655123",
"signature_type": "Function",
"id": "CVE-2022-49044-d3dfc2f8",
"target": {
"file": "drivers/md/dm-integrity.c",
"function": "dm_integrity_ctr"
}
}
]