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.
[
{
"id": "CVE-2022-49044-1149b25b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7f84c937222944c03f4615ca4742df6bed0e5adf",
"signature_version": "v1",
"digest": {
"length": 16729.0,
"function_hash": "321744949208368959370047447582992509566"
},
"deprecated": false,
"signature_type": "Function",
"target": {
"function": "dm_integrity_ctr",
"file": "drivers/md/dm-integrity.c"
}
},
{
"id": "CVE-2022-49044-16ee6544",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6b4bf97587ef6c1927a78934b700204920655123",
"signature_version": "v1",
"digest": {
"line_hashes": [
"52856859356142990491971706355273838834",
"53787430387654165943701788114929381376",
"202576271748034535749986379990953655227",
"145411653850818000843842441587772669566",
"289959025375707022840012519930285440675",
"258316069174892209576071784847856954958",
"180188258111482902763457976698533087412",
"209692000431492321765809730753209455593",
"137717377397409733888452864077461733473"
],
"threshold": 0.9
},
"deprecated": false,
"signature_type": "Line",
"target": {
"file": "drivers/md/dm-integrity.c"
}
},
{
"id": "CVE-2022-49044-2ba4bf13",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@08c1af8f1c13bbf210f1760132f4df24d0ed46d6",
"signature_version": "v1",
"digest": {
"line_hashes": [
"52856859356142990491971706355273838834",
"53787430387654165943701788114929381376",
"202576271748034535749986379990953655227",
"145411653850818000843842441587772669566",
"289959025375707022840012519930285440675",
"258316069174892209576071784847856954958",
"180188258111482902763457976698533087412",
"209692000431492321765809730753209455593",
"137717377397409733888452864077461733473"
],
"threshold": 0.9
},
"deprecated": false,
"signature_type": "Line",
"target": {
"file": "drivers/md/dm-integrity.c"
}
},
{
"id": "CVE-2022-49044-3ff31808",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4d485cf9b609709e45d5113e6e2b1b01254b2fe9",
"signature_version": "v1",
"digest": {
"length": 17054.0,
"function_hash": "285959247468210524185551078533927193895"
},
"deprecated": false,
"signature_type": "Function",
"target": {
"function": "dm_integrity_ctr",
"file": "drivers/md/dm-integrity.c"
}
},
{
"id": "CVE-2022-49044-4856a197",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6a95d91c0b315c965198f6ab7dec7c94129e17e0",
"signature_version": "v1",
"digest": {
"line_hashes": [
"64811171243165411716061158845210722749",
"41016239018491700343443734663132015670",
"104273647224515111228053706011183606806",
"154927583372904043030907085090301419594",
"289959025375707022840012519930285440675",
"258316069174892209576071784847856954958",
"180188258111482902763457976698533087412",
"209692000431492321765809730753209455593",
"137717377397409733888452864077461733473"
],
"threshold": 0.9
},
"deprecated": false,
"signature_type": "Line",
"target": {
"file": "drivers/md/dm-integrity.c"
}
},
{
"id": "CVE-2022-49044-b53b5a1e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4d485cf9b609709e45d5113e6e2b1b01254b2fe9",
"signature_version": "v1",
"digest": {
"line_hashes": [
"52856859356142990491971706355273838834",
"53787430387654165943701788114929381376",
"202576271748034535749986379990953655227",
"145411653850818000843842441587772669566",
"289959025375707022840012519930285440675",
"258316069174892209576071784847856954958",
"180188258111482902763457976698533087412",
"209692000431492321765809730753209455593",
"137717377397409733888452864077461733473"
],
"threshold": 0.9
},
"deprecated": false,
"signature_type": "Line",
"target": {
"file": "drivers/md/dm-integrity.c"
}
},
{
"id": "CVE-2022-49044-d3dfc2f8",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6b4bf97587ef6c1927a78934b700204920655123",
"signature_version": "v1",
"digest": {
"length": 17056.0,
"function_hash": "150747781096872836263303956227464784917"
},
"deprecated": false,
"signature_type": "Function",
"target": {
"function": "dm_integrity_ctr",
"file": "drivers/md/dm-integrity.c"
}
},
{
"id": "CVE-2022-49044-e5c14d76",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd02b2687d66f0a8e716384de4b9a0671331f1dc",
"signature_version": "v1",
"digest": {
"line_hashes": [
"52856859356142990491971706355273838834",
"53787430387654165943701788114929381376",
"202576271748034535749986379990953655227",
"145411653850818000843842441587772669566",
"289959025375707022840012519930285440675",
"258316069174892209576071784847856954958",
"180188258111482902763457976698533087412",
"209692000431492321765809730753209455593",
"137717377397409733888452864077461733473"
],
"threshold": 0.9
},
"deprecated": false,
"signature_type": "Line",
"target": {
"file": "drivers/md/dm-integrity.c"
}
},
{
"id": "CVE-2022-49044-e8ce7197",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6a95d91c0b315c965198f6ab7dec7c94129e17e0",
"signature_version": "v1",
"digest": {
"length": 13971.0,
"function_hash": "78624511945205318239727647275613972043"
},
"deprecated": false,
"signature_type": "Function",
"target": {
"function": "dm_integrity_ctr",
"file": "drivers/md/dm-integrity.c"
}
},
{
"id": "CVE-2022-49044-f37252f7",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@08c1af8f1c13bbf210f1760132f4df24d0ed46d6",
"signature_version": "v1",
"digest": {
"length": 17054.0,
"function_hash": "285959247468210524185551078533927193895"
},
"deprecated": false,
"signature_type": "Function",
"target": {
"function": "dm_integrity_ctr",
"file": "drivers/md/dm-integrity.c"
}
},
{
"id": "CVE-2022-49044-fab8db1f",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7f84c937222944c03f4615ca4742df6bed0e5adf",
"signature_version": "v1",
"digest": {
"line_hashes": [
"52856859356142990491971706355273838834",
"53787430387654165943701788114929381376",
"202576271748034535749986379990953655227",
"145411653850818000843842441587772669566",
"289959025375707022840012519930285440675",
"258316069174892209576071784847856954958",
"180188258111482902763457976698533087412",
"209692000431492321765809730753209455593",
"137717377397409733888452864077461733473"
],
"threshold": 0.9
},
"deprecated": false,
"signature_type": "Line",
"target": {
"file": "drivers/md/dm-integrity.c"
}
},
{
"id": "CVE-2022-49044-fb765537",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd02b2687d66f0a8e716384de4b9a0671331f1dc",
"signature_version": "v1",
"digest": {
"length": 16854.0,
"function_hash": "144004440220992351115241127287364144443"
},
"deprecated": false,
"signature_type": "Function",
"target": {
"function": "dm_integrity_ctr",
"file": "drivers/md/dm-integrity.c"
}
}
]