In the Linux kernel, the following vulnerability has been resolved:
net: qrtr: start MHI channel after endpoit creation
MHI channel may generates event/interrupt right after enabling. It may leads to 2 race conditions issues.
1) Such event may be dropped by qcommhiqrtrdlcallback() at check:
if (!qdev || mhi_res->transaction_status)
return;
Because devsetdrvdata(&mhi_dev->dev, qdev) may be not performed at this moment. In this situation qrtr-ns will be unable to enumerate
2) Such event may come at the moment after devsetdrvdata() and before qrtrendpointregister(). In this case kernel will panic with accessing wrong pointer at qcommhiqrtrdlcallback():
rc = qrtr_endpoint_post(&qdev->ep, mhi_res->buf_addr,
mhi_res->bytes_xferd);
So move mhipreparefortransferautoqueue after endpoint creation to fix it.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@68a838b84effb7b57ba7d50b1863fc6ae35a54ce",
"target": {
"file": "net/qrtr/mhi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-50044-1ca9545e",
"digest": {
"threshold": 0.9,
"line_hashes": [
"54198084913585407450494231414455827844",
"234282686381124451142426547339002504865",
"45878081916333597062310070737312500819",
"332083046343541106697957981849241980257",
"308323991456230142499428315961566858695",
"117988203402776619052396311124955479609",
"211826804115492358074890105419499584032",
"13673165564694740046380045704423430940",
"28946537871278695111867230042278302789"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c682fb70a7dfc25b848a4ff3a385b0471b470606",
"target": {
"function": "qcom_mhi_qrtr_probe",
"file": "net/qrtr/mhi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-50044-3631ce46",
"digest": {
"length": 521.0,
"function_hash": "43842351851125851371815442833016971106"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@68a838b84effb7b57ba7d50b1863fc6ae35a54ce",
"target": {
"function": "qcom_mhi_qrtr_probe",
"file": "net/qrtr/mhi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-50044-41ceb3de",
"digest": {
"length": 521.0,
"function_hash": "43842351851125851371815442833016971106"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a1a75f78a2937567946b1b756f82462874b5ca20",
"target": {
"function": "qcom_mhi_qrtr_probe",
"file": "net/qrtr/mhi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-50044-d21b4be5",
"digest": {
"length": 521.0,
"function_hash": "43842351851125851371815442833016971106"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a1a75f78a2937567946b1b756f82462874b5ca20",
"target": {
"file": "net/qrtr/mhi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-50044-dc000d25",
"digest": {
"threshold": 0.9,
"line_hashes": [
"54198084913585407450494231414455827844",
"234282686381124451142426547339002504865",
"45878081916333597062310070737312500819",
"332083046343541106697957981849241980257",
"308323991456230142499428315961566858695",
"117988203402776619052396311124955479609",
"211826804115492358074890105419499584032",
"13673165564694740046380045704423430940",
"28946537871278695111867230042278302789"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c682fb70a7dfc25b848a4ff3a385b0471b470606",
"target": {
"file": "net/qrtr/mhi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-50044-dd466592",
"digest": {
"threshold": 0.9,
"line_hashes": [
"274601294006372800979379532383182583595",
"198723012300393207478483355156315237989",
"285416884946622861061168771923788059333",
"98289985401574975827014014074177916871",
"308323991456230142499428315961566858695",
"117988203402776619052396311124955479609",
"211826804115492358074890105419499584032",
"13673165564694740046380045704423430940",
"28946537871278695111867230042278302789"
]
},
"signature_type": "Line"
}
]