In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Fix mlx5eprivinit() cleanup flow
When mlx5eprivinit() fails, the cleanup flow calls mlx5eselqcleanup which
calls mlx5eselqapply() that assures that the priv->state_lock is held using
lockdepisheld().
Acquire the statelock in mlx5eselq_cleanup().
WARNING: suspicious RCU usage
drivers/net/ethernet/mellanox/mlx5/core/en/selq.c:124 suspicious rcudereferenceprotected() usage!
other info that might help us debug this:
rcuscheduleractive = 2, debuglocks = 1 2 locks held by systemd-modules/293: #0: ffffffffa05067b0 (devicesrwsem){++++}-{3:3}, at: ibregisterclient+0x109/0x1b0 [ibcore] #1: ffff8881096c65c0 (&device->clientdatarwsem){++++}-{3:3}, at: addclientcontext+0x104/0x1c0 [ibcore]
stack backtrace: CPU: 4 PID: 293 Comm: systemd-modules Not tainted 6.8.0-rc3netnext841a9b5 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dumpstacklvl+0x8a/0xa0 lockdeprcususpicious+0x154/0x1a0 mlx5eselqapply+0x94/0xa0 [mlx5core] mlx5eselqcleanup+0x3a/0x60 [mlx5core] mlx5eprivinit+0x2be/0x2f0 [mlx5core] mlx5rdmasetuprn+0x7c/0x1a0 [mlx5core] rdmainitnetdev+0x4e/0x80 [ibcore] ? mlx5rdmanetdevfree+0x70/0x70 [mlx5core] ipoibintfinit+0x64/0x550 [ibipoib] ipoibintfalloc+0x4e/0xc0 [ibipoib] ipoibaddone+0xb0/0x360 [ibipoib] addclientcontext+0x112/0x1c0 [ibcore] ibregisterclient+0x166/0x1b0 [ibcore] ? 0xffffffffa0573000 ipoibinitmodule+0xeb/0x1a0 [ibipoib] dooneinitcall+0x61/0x250 doinitmodule+0x8a/0x270 initmodulefromfile+0x8b/0xd0 idempotentinitmodule+0x17d/0x230 _x64sysfinitmodule+0x61/0xb0 dosyscall64+0x71/0x140 entrySYSCALL64afterhwframe+0x46/0x4e </TASK>
[
{
"digest": {
"length": 239.0,
"function_hash": "292616793415687634407419691715450301594"
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/selq.c",
"function": "mlx5e_selq_cleanup"
},
"signature_type": "Function",
"id": "CVE-2024-35959-1ffbf547",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6bd77865fda662913dcb5722a66a773840370aa7"
},
{
"digest": {
"line_hashes": [
"52554351596092881107869062858269276731",
"2406391831776979000132007011946692580",
"327324637086270967207082067380635459433",
"329349948213340143511571975744239048959",
"108881841786055895489761450133880577352",
"231612206605458081137022376296728381113"
],
"threshold": 0.9
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en_main.c"
},
"signature_type": "Line",
"id": "CVE-2024-35959-2e03c527",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ecb829459a841198e142f72fadab56424ae96519"
},
{
"digest": {
"line_hashes": [
"152234894320264847456355845111544364492",
"133788223433299995662907074235885268528",
"98714480633845972928186898473917471131",
"114453739963952488576618835425881326553",
"304026468190110126277361455882859031363",
"144351542941729185253823494200936657275",
"250302980114763658528985294415886510915",
"291520485558025266118905593391490182591"
],
"threshold": 0.9
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/selq.c"
},
"signature_type": "Line",
"id": "CVE-2024-35959-3402951d",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f9ac93b6f3de34aa0bb983b9be4f69ca50fc70f3"
},
{
"digest": {
"length": 651.0,
"function_hash": "120579572620599068544742021279759338585"
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en_main.c",
"function": "mlx5e_priv_cleanup"
},
"signature_type": "Function",
"id": "CVE-2024-35959-7e74492d",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6bd77865fda662913dcb5722a66a773840370aa7"
},
{
"digest": {
"line_hashes": [
"52554351596092881107869062858269276731",
"2406391831776979000132007011946692580",
"327324637086270967207082067380635459433",
"329349948213340143511571975744239048959",
"108881841786055895489761450133880577352",
"231612206605458081137022376296728381113"
],
"threshold": 0.9
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en_main.c"
},
"signature_type": "Line",
"id": "CVE-2024-35959-89f7c25b",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6bd77865fda662913dcb5722a66a773840370aa7"
},
{
"digest": {
"length": 239.0,
"function_hash": "292616793415687634407419691715450301594"
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/selq.c",
"function": "mlx5e_selq_cleanup"
},
"signature_type": "Function",
"id": "CVE-2024-35959-8a49ce39",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f9ac93b6f3de34aa0bb983b9be4f69ca50fc70f3"
},
{
"digest": {
"length": 239.0,
"function_hash": "292616793415687634407419691715450301594"
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/selq.c",
"function": "mlx5e_selq_cleanup"
},
"signature_type": "Function",
"id": "CVE-2024-35959-980c1af7",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ecb829459a841198e142f72fadab56424ae96519"
},
{
"digest": {
"line_hashes": [
"52554351596092881107869062858269276731",
"2406391831776979000132007011946692580",
"327324637086270967207082067380635459433",
"329349948213340143511571975744239048959",
"108881841786055895489761450133880577352",
"231612206605458081137022376296728381113"
],
"threshold": 0.9
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en_main.c"
},
"signature_type": "Line",
"id": "CVE-2024-35959-a7bc0112",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f9ac93b6f3de34aa0bb983b9be4f69ca50fc70f3"
},
{
"digest": {
"line_hashes": [
"152234894320264847456355845111544364492",
"133788223433299995662907074235885268528",
"98714480633845972928186898473917471131",
"114453739963952488576618835425881326553",
"304026468190110126277361455882859031363",
"144351542941729185253823494200936657275",
"250302980114763658528985294415886510915",
"291520485558025266118905593391490182591"
],
"threshold": 0.9
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/selq.c"
},
"signature_type": "Line",
"id": "CVE-2024-35959-c077c895",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6bd77865fda662913dcb5722a66a773840370aa7"
},
{
"digest": {
"length": 651.0,
"function_hash": "120579572620599068544742021279759338585"
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en_main.c",
"function": "mlx5e_priv_cleanup"
},
"signature_type": "Function",
"id": "CVE-2024-35959-d5a7fea4",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ecb829459a841198e142f72fadab56424ae96519"
},
{
"digest": {
"line_hashes": [
"152234894320264847456355845111544364492",
"133788223433299995662907074235885268528",
"98714480633845972928186898473917471131",
"114453739963952488576618835425881326553",
"304026468190110126277361455882859031363",
"144351542941729185253823494200936657275",
"250302980114763658528985294415886510915",
"291520485558025266118905593391490182591"
],
"threshold": 0.9
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/selq.c"
},
"signature_type": "Line",
"id": "CVE-2024-35959-e6f6ddf6",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ecb829459a841198e142f72fadab56424ae96519"
},
{
"digest": {
"length": 651.0,
"function_hash": "120579572620599068544742021279759338585"
},
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en_main.c",
"function": "mlx5e_priv_cleanup"
},
"signature_type": "Function",
"id": "CVE-2024-35959-fdd5a72a",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f9ac93b6f3de34aa0bb983b9be4f69ca50fc70f3"
}
]