In the Linux kernel, the following vulnerability has been resolved:
net: dsa: microchip: Added the condition for scheduling kszmibread_work
When the ksz module is installed and removed using rmmod, kernel crashes with null pointer dereferrence error. During rmmod, kszswitchremove function tries to cancel the mibreadworkqueue using canceldelayedwork_sync routine and unregister switch from dsa.
During dsaunregisterswitch it calls kszmaclinkdown, which in turn reschedules the workqueue since mibinterval is non-zero. Due to which queue executed after mibinterval and it tries to access dp->slave. But the slave is unregistered in the kszswitch_remove function. Hence kernel crashes.
To avoid this crash, before canceling the workqueue, resetted the mib_interval to 0.
v1 -> v2: -Removed the if condition in kszmibread_work
[
{
"events": [
{
"introduced": "5.7"
},
{
"fixed": "5.10.75"
}
]
},
{
"events": [
{
"introduced": "5.11"
},
{
"fixed": "5.14.14"
}
]
},
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "5.15-rc1"
}
]
},
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "5.15-rc2"
}
]
},
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "5.15-rc3"
}
]
},
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "5.15-rc4"
}
]
},
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "5.15-rc5"
}
]
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-47439.json"