In the Linux kernel, the following vulnerability has been resolved:
mapletree: fix masemptyarearev() null pointer dereference
Currently the code calls masstart() followed by masdataend() if the maple state is MASTART, but masstart() may return with the maple state node == NULL. This will lead to a null pointer dereference when checking information in the NULL node, which is done in masdata_end().
Avoid setting the offset if there is no node by waiting until after the maple state is checked for an empty or single entry state.
A user could trigger the events to cause a kernel oops by unmapping all vmas to produce an empty maple tree, then mapping a vma that would cause the scenario described above.
[
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"273657719220588998642962631814989765435",
"100160811872133981483230212698259474931",
"93592813954597503289060207663517979194",
"338694248607874596637672412056540775725",
"36929883770478812151216724901747280228",
"109262418878716252966188566606850140604",
"178861306349008299937976079432796255732",
"39921302934760247510087618035480902522",
"122983119014815386206968141522472116910",
"28639459370468388165176763142375379435",
"171911067463157831961085166916348394575",
"43965439638375855558539352356614296693",
"183291893579487218830145927680089583523"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6c9c7c1e63b198a8b979ad963eb21410f10ccb00",
"target": {
"file": "lib/maple_tree.c"
},
"id": "CVE-2024-36891-05a5efba"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 1011.0,
"function_hash": "177467736461415130552618588268371141467"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6c9c7c1e63b198a8b979ad963eb21410f10ccb00",
"target": {
"file": "lib/maple_tree.c",
"function": "mas_empty_area_rev"
},
"id": "CVE-2024-36891-2b9c7921"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 948.0,
"function_hash": "65589369470236308012469916604867037215"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@883e5d542bbdddbddeba60250cb482baf3ae2415",
"target": {
"file": "lib/maple_tree.c",
"function": "mas_empty_area_rev"
},
"id": "CVE-2024-36891-7efd4837"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"142293270044951578330364355177963805130",
"202795931791656237869138211610430742221",
"93592813954597503289060207663517979194",
"338694248607874596637672412056540775725",
"36929883770478812151216724901747280228",
"109262418878716252966188566606850140604",
"178861306349008299937976079432796255732",
"39921302934760247510087618035480902522",
"122983119014815386206968141522472116910",
"28639459370468388165176763142375379435",
"171911067463157831961085166916348394575",
"43965439638375855558539352356614296693",
"183291893579487218830145927680089583523"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@883e5d542bbdddbddeba60250cb482baf3ae2415",
"target": {
"file": "lib/maple_tree.c"
},
"id": "CVE-2024-36891-9f70d979"
}
]