In the Linux kernel, the following vulnerability has been resolved:
ixgbe: Add locking to prevent panic when setting sriov_numvfs to zero
It is possible to disable VFs while the PF driver is processing requests from the VF driver. This can result in a panic.
BUG: unable to handle kernel paging request at 000000000000106c PGD 0 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 8 PID: 0 Comm: swapper/8 Kdump: loaded Tainted: G I --------- - Hardware name: Dell Inc. PowerEdge R740/06WXJT, BIOS 2.8.2 08/27/2020 RIP: 0010:ixgbemsgtask+0x4c8/0x1690 [ixgbe] Code: 00 00 48 8d 04 40 48 c1 e0 05 89 7c 24 24 89 fd 48 89 44 24 10 83 ff 01 0f 84 b8 04 00 00 4c 8b 64 24 10 4d 03 a5 48 22 00 00 <41> 80 7c 24 4c 00 0f 84 8a 03 00 00 0f b7 c7 83 f8 08 0f 84 8f 0a RSP: 0018:ffffb337869f8df8 EFLAGS: 00010002 RAX: 0000000000001020 RBX: 0000000000000000 RCX: 000000000000002b RDX: 0000000000000002 RSI: 0000000000000008 RDI: 0000000000000006 RBP: 0000000000000006 R08: 0000000000000002 R09: 0000000000029780 R10: 00006957d8f42832 R11: 0000000000000000 R12: 0000000000001020 R13: ffff8a00e8978ac0 R14: 000000000000002b R15: ffff8a00e8979c80 FS: 0000000000000000(0000) GS:ffff8a07dfd00000(0000) knlGS:00000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000106c CR3: 0000000063e10004 CR4: 00000000007726e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: <IRQ> ? ttwudowakeup+0x19/0x140 ? trytowakeup+0x1cd/0x550 ? ixgbevfupdatexcastmode+0x71/0xc0 [ixgbevf] ixgbemsixother+0x17e/0x310 [ixgbe] _handleirqeventpercpu+0x40/0x180 handleirqeventpercpu+0x30/0x80 handleirqevent+0x36/0x53 handleedgeirq+0x82/0x190 handleirq+0x1c/0x30 doIRQ+0x49/0xd0 commoninterrupt+0xf/0xf
This can be eventually be reproduced with the following script:
while : do echo 63 > /sys/class/net/<devname>/device/sriovnumvfs sleep 1 echo 0 > /sys/class/net/<devname>/device/sriovnumvfs sleep 1 done
Add lock when disabling SR-IOV to prevent process VF mailbox communication.
[
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 310.0,
"function_hash": "95652298760528634231065161160131641541"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@031af9e617a6f51075d97e56fc9e712c7dde2508",
"target": {
"file": "drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c",
"function": "ixgbe_msg_task"
},
"id": "CVE-2022-49584-17a3f80a"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 4803.0,
"function_hash": "59661827087158401810767739185592794967"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@031af9e617a6f51075d97e56fc9e712c7dde2508",
"target": {
"file": "drivers/net/ethernet/intel/ixgbe/ixgbe_main.c",
"function": "ixgbe_sw_init"
},
"id": "CVE-2022-49584-4145d346"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"26400256286529449536586158771776818045",
"123907532887412922095128584679265707784",
"3723621565407316458338081995153508440",
"109767752883377104339056383787273537250"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@031af9e617a6f51075d97e56fc9e712c7dde2508",
"target": {
"file": "drivers/net/ethernet/intel/ixgbe/ixgbe.h"
},
"id": "CVE-2022-49584-829bb9b3"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 1100.0,
"function_hash": "151152615345661920128088915844104316977"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@031af9e617a6f51075d97e56fc9e712c7dde2508",
"target": {
"file": "drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c",
"function": "ixgbe_disable_sriov"
},
"id": "CVE-2022-49584-b4994834"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"24413804699855611333111579599293913831",
"58873301263394432161999001718061377754",
"63420700109533105923614097295946743981",
"2892892936971125114193465531439084563",
"214177830822257943643938225204982150375",
"330978872740713630639273126616112229377",
"275278334336802076140073221519137593849",
"7149884176265914745365292909268589464",
"14482926068653700885946102329866426386",
"282035843476639703761700143996492544761",
"168454161646084461631967056833106195334",
"214484262395275912785781576068028589994",
"15590449703153655119494160966566611629",
"326667895211256463499290917287904812684",
"312012093517290472979240201082787906605"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@031af9e617a6f51075d97e56fc9e712c7dde2508",
"target": {
"file": "drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c"
},
"id": "CVE-2022-49584-ed9e1fd2"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"118120726709146721724451142371585954675",
"144830826650480650598859141184141988588",
"87585723347853244019241958518069415672"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@031af9e617a6f51075d97e56fc9e712c7dde2508",
"target": {
"file": "drivers/net/ethernet/intel/ixgbe/ixgbe_main.c"
},
"id": "CVE-2022-49584-f58d6ac2"
}
]