In the Linux kernel, the following vulnerability has been resolved:
netdevsim: Add trailing zero to terminate the string in nsimnexthopbucketactivitywrite()
This was found by a static analyzer. We should not forget the trailing zero after copyfromuser() if we will further do some string operations, sscanf() in this case. Adding a trailing zero will ensure that the function performs properly.
[
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/net/netdevsim/fib.c",
"function": "nsim_nexthop_bucket_activity_write"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4ce1f56a1eaced2523329bef800d004e30f2f76c",
"digest": {
"length": 934.0,
"function_hash": "321484262655633182808649914662061734420"
},
"id": "CVE-2024-50259-31c8f475"
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/net/netdevsim/fib.c",
"function": "nsim_nexthop_bucket_activity_write"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6a604877160fe5ab2e1985d5ce1ba6a61abe0693",
"digest": {
"length": 934.0,
"function_hash": "321484262655633182808649914662061734420"
},
"id": "CVE-2024-50259-561a1663"
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/net/netdevsim/fib.c",
"function": "nsim_nexthop_bucket_activity_write"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c2150f666c6fc301d5d1643ed0f92251f1a0ff0d",
"digest": {
"length": 934.0,
"function_hash": "321484262655633182808649914662061734420"
},
"id": "CVE-2024-50259-c0ab1311"
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/net/netdevsim/fib.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4ce1f56a1eaced2523329bef800d004e30f2f76c",
"digest": {
"line_hashes": [
"27554075154942441812699344510292230383",
"111490438801749068138337421308968479319",
"9921725748509377754239939145365340647",
"91825826619839451791910631101907827488",
"132200677410631886096419734119232497027",
"170737286653557457585534431145916739470",
"135074585786794669172322835080382626384"
],
"threshold": 0.9
},
"id": "CVE-2024-50259-c22f6909"
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/net/netdevsim/fib.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c2150f666c6fc301d5d1643ed0f92251f1a0ff0d",
"digest": {
"line_hashes": [
"27554075154942441812699344510292230383",
"111490438801749068138337421308968479319",
"9921725748509377754239939145365340647",
"91825826619839451791910631101907827488",
"132200677410631886096419734119232497027",
"170737286653557457585534431145916739470",
"135074585786794669172322835080382626384"
],
"threshold": 0.9
},
"id": "CVE-2024-50259-d9f4fa39"
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/net/netdevsim/fib.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6a604877160fe5ab2e1985d5ce1ba6a61abe0693",
"digest": {
"line_hashes": [
"27554075154942441812699344510292230383",
"111490438801749068138337421308968479319",
"9921725748509377754239939145365340647",
"91825826619839451791910631101907827488",
"132200677410631886096419734119232497027",
"170737286653557457585534431145916739470",
"135074585786794669172322835080382626384"
],
"threshold": 0.9
},
"id": "CVE-2024-50259-ec69ebe5"
}
]