In the Linux kernel, the following vulnerability has been resolved:
net: dsa: fix a crash if ->getssetcount() fails
If ds->ops->getssetcount() fails then it "count" is a negative error code such as -EOPNOTSUPP. Because "i" is an unsigned int, the negative error code is type promoted to a very high value and the loop will corrupt memory until the system crashes.
Fix this by checking for error codes and changing the type of "i" to just int.
[
{
"events": [
{
"introduced": "4.7"
},
{
"fixed": "4.19.193"
}
]
},
{
"events": [
{
"introduced": "4.20"
},
{
"fixed": "5.4.124"
}
]
},
{
"events": [
{
"introduced": "5.5"
},
{
"fixed": "5.10.42"
}
]
},
{
"events": [
{
"introduced": "5.11"
},
{
"fixed": "5.12.9"
}
]
},
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "5.13-rc1"
}
]
},
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "5.13-rc2"
}
]
},
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "5.13-rc3"
}
]
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-47159.json"