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, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@27bd7a742e171362c9eb52ad5d1d71d3321f949f", "signature_version": "v1", "target": { "function": "nsim_nexthop_bucket_activity_write", "file": "drivers/net/netdevsim/fib.c" }, "digest": { "function_hash": "321484262655633182808649914662061734420", "length": 934.0 }, "id": "CVE-2024-50259-0a1b064a" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcba86e03b3aac361ea671672cf48eed11f9011c", "signature_version": "v1", "target": { "file": "drivers/net/netdevsim/fib.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "27554075154942441812699344510292230383", "111490438801749068138337421308968479319", "9921725748509377754239939145365340647", "91825826619839451791910631101907827488", "132200677410631886096419734119232497027", "170737286653557457585534431145916739470", "135074585786794669172322835080382626384" ] }, "id": "CVE-2024-50259-2597c455" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4ce1f56a1eaced2523329bef800d004e30f2f76c", "signature_version": "v1", "target": { "function": "nsim_nexthop_bucket_activity_write", "file": "drivers/net/netdevsim/fib.c" }, "digest": { "function_hash": "321484262655633182808649914662061734420", "length": 934.0 }, "id": "CVE-2024-50259-31c8f475" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6a604877160fe5ab2e1985d5ce1ba6a61abe0693", "signature_version": "v1", "target": { "function": "nsim_nexthop_bucket_activity_write", "file": "drivers/net/netdevsim/fib.c" }, "digest": { "function_hash": "321484262655633182808649914662061734420", "length": 934.0 }, "id": "CVE-2024-50259-561a1663" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcba86e03b3aac361ea671672cf48eed11f9011c", "signature_version": "v1", "target": { "function": "nsim_nexthop_bucket_activity_write", "file": "drivers/net/netdevsim/fib.c" }, "digest": { "function_hash": "321484262655633182808649914662061734420", "length": 934.0 }, "id": "CVE-2024-50259-b1dddeba" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@27bd7a742e171362c9eb52ad5d1d71d3321f949f", "signature_version": "v1", "target": { "file": "drivers/net/netdevsim/fib.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "27554075154942441812699344510292230383", "111490438801749068138337421308968479319", "9921725748509377754239939145365340647", "91825826619839451791910631101907827488", "132200677410631886096419734119232497027", "170737286653557457585534431145916739470", "135074585786794669172322835080382626384" ] }, "id": "CVE-2024-50259-be4dbfc5" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c2150f666c6fc301d5d1643ed0f92251f1a0ff0d", "signature_version": "v1", "target": { "function": "nsim_nexthop_bucket_activity_write", "file": "drivers/net/netdevsim/fib.c" }, "digest": { "function_hash": "321484262655633182808649914662061734420", "length": 934.0 }, "id": "CVE-2024-50259-c0ab1311" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4ce1f56a1eaced2523329bef800d004e30f2f76c", "signature_version": "v1", "target": { "file": "drivers/net/netdevsim/fib.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "27554075154942441812699344510292230383", "111490438801749068138337421308968479319", "9921725748509377754239939145365340647", "91825826619839451791910631101907827488", "132200677410631886096419734119232497027", "170737286653557457585534431145916739470", "135074585786794669172322835080382626384" ] }, "id": "CVE-2024-50259-c22f6909" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c2150f666c6fc301d5d1643ed0f92251f1a0ff0d", "signature_version": "v1", "target": { "file": "drivers/net/netdevsim/fib.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "27554075154942441812699344510292230383", "111490438801749068138337421308968479319", "9921725748509377754239939145365340647", "91825826619839451791910631101907827488", "132200677410631886096419734119232497027", "170737286653557457585534431145916739470", "135074585786794669172322835080382626384" ] }, "id": "CVE-2024-50259-d9f4fa39" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6a604877160fe5ab2e1985d5ce1ba6a61abe0693", "signature_version": "v1", "target": { "file": "drivers/net/netdevsim/fib.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "27554075154942441812699344510292230383", "111490438801749068138337421308968479319", "9921725748509377754239939145365340647", "91825826619839451791910631101907827488", "132200677410631886096419734119232497027", "170737286653557457585534431145916739470", "135074585786794669172322835080382626384" ] }, "id": "CVE-2024-50259-ec69ebe5" } ]