In the Linux kernel, the following vulnerability has been resolved:
IB/core: Fix a nested dead lock as part of ODP flow
Fix a nested dead lock as part of ODP flow by using mmput_async().
From the below call trace [1] can see that calling mmput() once we have the umemodp->umemmutex locked as required by ibumemodpmapdmaandlock() might trigger in the same task the exitmmap()->mmunotifierrelease()->mlx5ibinvalidaterange() which may dead lock when trying to lock the same mutex.
Moving to use mmputasync() will solve the problem as the above exitmmap() flow will be called in other task and will be executed once the lock will be available.
[1] [64843.077665] task:kworker/u133:2 state:D stack: 0 pid:80906 ppid: 2 flags:0x00004000 [64843.077672] Workqueue: mlx5ibpagefault mlx5ibeqepfaction [mlx5ib] [64843.077719] Call Trace: [64843.077722] <TASK> [64843.077724] _schedule+0x23d/0x590 [64843.077729] schedule+0x4e/0xb0 [64843.077735] schedulepreemptdisabled+0xe/0x10 [64843.077740] _mutexlock.constprop.0+0x263/0x490 [64843.077747] _mutexlockslowpath+0x13/0x20 [64843.077752] mutexlock+0x34/0x40 [64843.077758] mlx5ibinvalidaterange+0x48/0x270 [mlx5ib] [64843.077808] _mmunotifierrelease+0x1a4/0x200 [64843.077816] exitmmap+0x1bc/0x200 [64843.077822] ? walkpagerange+0x9c/0x120 [64843.077828] ? _condresched+0x1a/0x50 [64843.077833] ? mutexlock+0x13/0x40 [64843.077839] ? uprobeclearstate+0xac/0x120 [64843.077860] mmput+0x5f/0x140 [64843.077867] ibumemodpmapdmaandlock+0x21b/0x580 [ibcore] [64843.077931] pagefaultrealmr+0x9a/0x140 [mlx5ib] [64843.077962] pagefaultmr+0xb4/0x550 [mlx5ib] [64843.077992] pagefaultsingledatasegment.constprop.0+0x2ac/0x560 [mlx5ib] [64843.078022] mlx5ibeqepfaction+0x528/0x780 [mlx5ib] [64843.078051] processonework+0x22b/0x3d0 [64843.078059] workerthread+0x53/0x410 [64843.078065] ? processonework+0x3d0/0x3d0 [64843.078073] kthread+0x12a/0x150 [64843.078079] ? setkthreadstruct+0x50/0x50 [64843.078085] retfromfork+0x22/0x30 [64843.078093] </TASK>
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48675.json"
}[
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"131847248682038244829605110310442376317",
"234710427474000012139468220004122520208",
"245749897712557947501653970831638616650",
"37297183797916935434365053296204673791"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "kernel/fork.c"
},
"signature_type": "Line",
"id": "CVE-2022-48675-6abd7d35",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@85eaeb5058f0f04dffb124c97c86b4f18db0b833"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"131847248682038244829605110310442376317",
"234710427474000012139468220004122520208",
"245749897712557947501653970831638616650",
"37297183797916935434365053296204673791"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "kernel/fork.c"
},
"signature_type": "Line",
"id": "CVE-2022-48675-6e7dc6e4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@819110054b14d7272b4188db997a3d80f75ab785"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"131847248682038244829605110310442376317",
"234710427474000012139468220004122520208",
"152217353732986544523039783274130420766",
"195901067626371919715513609363119554371"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "kernel/fork.c"
},
"signature_type": "Line",
"id": "CVE-2022-48675-75b4fc6e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8de6cb5755eae7b793d8c00c8696c8667d44a7f"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"239954435312708995082565332823943124931",
"124260163642655162333948302823255061907",
"192685988291297950808375564838379795520",
"279640156034180848895394221759911539846"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "drivers/infiniband/core/umem_odp.c"
},
"signature_type": "Line",
"id": "CVE-2022-48675-9490f3ce",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@85eaeb5058f0f04dffb124c97c86b4f18db0b833"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"239954435312708995082565332823943124931",
"124260163642655162333948302823255061907",
"192685988291297950808375564838379795520",
"279640156034180848895394221759911539846"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "drivers/infiniband/core/umem_odp.c"
},
"signature_type": "Line",
"id": "CVE-2022-48675-c80b7181",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8de6cb5755eae7b793d8c00c8696c8667d44a7f"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"239954435312708995082565332823943124931",
"124260163642655162333948302823255061907",
"192685988291297950808375564838379795520",
"279640156034180848895394221759911539846"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "drivers/infiniband/core/umem_odp.c"
},
"signature_type": "Line",
"id": "CVE-2022-48675-ce19ff46",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@819110054b14d7272b4188db997a3d80f75ab785"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"131847248682038244829605110310442376317",
"234710427474000012139468220004122520208",
"245749897712557947501653970831638616650",
"37297183797916935434365053296204673791"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "kernel/fork.c"
},
"signature_type": "Line",
"id": "CVE-2022-48675-f8e2c674",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83c43fd872e32c8071d5582eb7c40f573a8342f3"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"239954435312708995082565332823943124931",
"124260163642655162333948302823255061907",
"192685988291297950808375564838379795520",
"279640156034180848895394221759911539846"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "drivers/infiniband/core/umem_odp.c"
},
"signature_type": "Line",
"id": "CVE-2022-48675-fead5131",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83c43fd872e32c8071d5582eb7c40f573a8342f3"
}
]