In the Linux kernel, the following vulnerability has been resolved:
mctp: perform route lookups under a RCU read-side lock
Our current route lookups (mctproutelookup and mctproutelookup_null) traverse the net's route list without the RCU read lock held. This means the route lookup is subject to preemption, resulting in an potential grace period expiry, and so an eventual kfree() while we still have the route pointer.
Add the proper read-side critical section locks around the route lookups, preventing premption and a possible parallel kfree.
The remaining net->mctp.routes accesses are already under a rcureadlock, or protected by the RTNL for updates.
Based on an analysis from Sili Luo rootlab@huawei.com, where introducing a delay in the route lookup could cause a UAF on simultaneous sendmsg() and route deletion.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/52xxx/CVE-2023-52483.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-52483.json"
[
{
"signature_type": "Line",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2405f64a95a7a094eb24cba9bcfaffd1ea264de4",
"digest": {
"line_hashes": [
"319241742137069264576581532881717038982",
"251618877283018076881250143562233657748",
"21843233341862178698845629919554207509",
"235238356107683688066465281475807181152",
"90244672383340133909303174591705869257",
"254228963247510035795847090453795387994",
"185796816662969235243937745258608216572",
"112996617361912380005899543385909653988",
"207838609862800270129626389485621635619",
"130660352681662770837444682651148076322",
"235759299618597706711215849978526961184",
"64304881312695349836782171335746720427",
"66185656926366782577416299570001645683",
"308188003619414462492976403610051620360",
"163163694860360546061182020137678246340",
"181663156205076706358638634259886640064",
"247045047711916184980262989361512393878",
"217736672245552424495163360119337357286"
],
"threshold": 0.9
},
"id": "CVE-2023-52483-131b812d",
"deprecated": false,
"target": {
"file": "net/mctp/route.c"
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5093bbfc10ab6636b32728e35813cbd79feb063c",
"digest": {
"function_hash": "246211044837981703720620395301356640511",
"length": 268.0
},
"id": "CVE-2023-52483-44bd5400",
"deprecated": false,
"target": {
"file": "net/mctp/route.c",
"function": "mctp_route_lookup_null"
}
},
{
"signature_type": "Line",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1db0724a01b558feb1ecae551782add1951a114a",
"digest": {
"line_hashes": [
"319241742137069264576581532881717038982",
"251618877283018076881250143562233657748",
"21843233341862178698845629919554207509",
"235238356107683688066465281475807181152",
"90244672383340133909303174591705869257",
"254228963247510035795847090453795387994",
"185796816662969235243937745258608216572",
"112996617361912380005899543385909653988",
"207838609862800270129626389485621635619",
"130660352681662770837444682651148076322",
"235759299618597706711215849978526961184",
"64304881312695349836782171335746720427",
"66185656926366782577416299570001645683",
"308188003619414462492976403610051620360",
"163163694860360546061182020137678246340",
"181663156205076706358638634259886640064",
"247045047711916184980262989361512393878",
"217736672245552424495163360119337357286"
],
"threshold": 0.9
},
"id": "CVE-2023-52483-54d1e699",
"deprecated": false,
"target": {
"file": "net/mctp/route.c"
}
},
{
"signature_type": "Line",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6c52b12159049046483fdb0c411a0a1869c41a67",
"digest": {
"line_hashes": [
"319241742137069264576581532881717038982",
"251618877283018076881250143562233657748",
"21843233341862178698845629919554207509",
"235238356107683688066465281475807181152",
"90244672383340133909303174591705869257",
"254228963247510035795847090453795387994",
"185796816662969235243937745258608216572",
"112996617361912380005899543385909653988",
"207838609862800270129626389485621635619",
"130660352681662770837444682651148076322",
"235759299618597706711215849978526961184",
"64304881312695349836782171335746720427",
"66185656926366782577416299570001645683",
"308188003619414462492976403610051620360",
"163163694860360546061182020137678246340",
"181663156205076706358638634259886640064",
"178298973326340313877173240752715774346",
"314440271408598374328844565127282173614"
],
"threshold": 0.9
},
"id": "CVE-2023-52483-5bd0ba76",
"deprecated": false,
"target": {
"file": "net/mctp/route.c"
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6c52b12159049046483fdb0c411a0a1869c41a67",
"digest": {
"function_hash": "95572639483201775649748078667996135560",
"length": 289.0
},
"id": "CVE-2023-52483-5e09c816",
"deprecated": false,
"target": {
"file": "net/mctp/route.c",
"function": "mctp_route_lookup"
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5093bbfc10ab6636b32728e35813cbd79feb063c",
"digest": {
"function_hash": "95572639483201775649748078667996135560",
"length": 289.0
},
"id": "CVE-2023-52483-66feee62",
"deprecated": false,
"target": {
"file": "net/mctp/route.c",
"function": "mctp_route_lookup"
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1db0724a01b558feb1ecae551782add1951a114a",
"digest": {
"function_hash": "246211044837981703720620395301356640511",
"length": 268.0
},
"id": "CVE-2023-52483-701496eb",
"deprecated": false,
"target": {
"file": "net/mctp/route.c",
"function": "mctp_route_lookup_null"
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6c52b12159049046483fdb0c411a0a1869c41a67",
"digest": {
"function_hash": "246211044837981703720620395301356640511",
"length": 268.0
},
"id": "CVE-2023-52483-b85b1236",
"deprecated": false,
"target": {
"file": "net/mctp/route.c",
"function": "mctp_route_lookup_null"
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2405f64a95a7a094eb24cba9bcfaffd1ea264de4",
"digest": {
"function_hash": "95572639483201775649748078667996135560",
"length": 289.0
},
"id": "CVE-2023-52483-b89db5b4",
"deprecated": false,
"target": {
"file": "net/mctp/route.c",
"function": "mctp_route_lookup"
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2405f64a95a7a094eb24cba9bcfaffd1ea264de4",
"digest": {
"function_hash": "246211044837981703720620395301356640511",
"length": 268.0
},
"id": "CVE-2023-52483-bc079c69",
"deprecated": false,
"target": {
"file": "net/mctp/route.c",
"function": "mctp_route_lookup_null"
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1db0724a01b558feb1ecae551782add1951a114a",
"digest": {
"function_hash": "95572639483201775649748078667996135560",
"length": 289.0
},
"id": "CVE-2023-52483-cc7fd63c",
"deprecated": false,
"target": {
"file": "net/mctp/route.c",
"function": "mctp_route_lookup"
}
},
{
"signature_type": "Line",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5093bbfc10ab6636b32728e35813cbd79feb063c",
"digest": {
"line_hashes": [
"319241742137069264576581532881717038982",
"251618877283018076881250143562233657748",
"21843233341862178698845629919554207509",
"235238356107683688066465281475807181152",
"90244672383340133909303174591705869257",
"254228963247510035795847090453795387994",
"185796816662969235243937745258608216572",
"112996617361912380005899543385909653988",
"207838609862800270129626389485621635619",
"130660352681662770837444682651148076322",
"235759299618597706711215849978526961184",
"64304881312695349836782171335746720427",
"66185656926366782577416299570001645683",
"308188003619414462492976403610051620360",
"163163694860360546061182020137678246340",
"181663156205076706358638634259886640064",
"247045047711916184980262989361512393878",
"217736672245552424495163360119337357286"
],
"threshold": 0.9
},
"id": "CVE-2023-52483-f2da451d",
"deprecated": false,
"target": {
"file": "net/mctp/route.c"
}
}
]