In the Linux kernel, the following vulnerability has been resolved:
ethtool: check device is present when getting link settings
A sysfs reader can race with a device reset or removal, attempting to read device state when the device is not actually present. eg:
[exception RIP: qed_get_current_link+17]
#8 [ffffb9e4f2907c48] qedegetlinkksettings at ffffffffc07a994a [qede] #9 [ffffb9e4f2907cd8] _rhcallgetlinkksettings at ffffffff992b01a3 #10 [ffffb9e4f2907d38] _ethtoolgetlinkksettings at ffffffff992b04e4 #11 [ffffb9e4f2907d90] duplexshow at ffffffff99260300 #12 [ffffb9e4f2907e38] devattrshow at ffffffff9905a01c #13 [ffffb9e4f2907e50] sysfskfseqshow at ffffffff98e0145b #14 [ffffb9e4f2907e68] seqread at ffffffff98d902e3 #15 [ffffb9e4f2907ec8] vfsread at ffffffff98d657d1 #16 [ffffb9e4f2907f00] ksysread at ffffffff98d65c3f #17 [ffffb9e4f2907f38] dosyscall_64 at ffffffff98a052fb
crash> struct net_device.state ffff9a9d21336000 state = 5,
state 5 is _LINKSTATESTART (0b1) and _LINKSTATENOCARRIER (0b100). The device is not present, note lack of _LINKSTATE_PRESENT (0b10).
This is the same sort of panic as observed in commit 4224cfd7fb65 ("net-sysfs: add check for netdevice being present to speed_show").
There are many other callers of _ethtoolgetlinkksettings() which don't have a device presence check.
Move this check into ethtool to protect all callers.
[
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"318623708332354879581591392214647124073",
"76764364796987035173986628251091763423",
"316368774919063895158150583151773845249"
]
},
"id": "CVE-2024-46679-06310f99",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9bba5955eed160102114d4cc00c3d399be9bdae4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c",
"function": "speed_show"
},
"digest": {
"length": 420.0,
"function_hash": "134615541409497262072005079817892726237"
},
"id": "CVE-2024-46679-21c2fa55",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1d6d9b5b1b95bfeccb84386a51b7e6c510ec13b2",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"318623708332354879581591392214647124073",
"76764364796987035173986628251091763423",
"316368774919063895158150583151773845249"
]
},
"id": "CVE-2024-46679-2a053969",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7a8d98b6d6484d3ad358510366022da080c37cbc",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c",
"function": "speed_show"
},
"digest": {
"length": 420.0,
"function_hash": "134615541409497262072005079817892726237"
},
"id": "CVE-2024-46679-30047aec",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec7b4f7f644018ac293cb1b02528a40a32917e62",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"2839974938788271000854881154941770496",
"162469270671122408021221579490778117149",
"313387100332343815024966037047716455535",
"187730317734476384218145497497908831470"
]
},
"id": "CVE-2024-46679-3baf783f",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@842a40c7273ba1c1cb30dda50405b328de1d860e",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c",
"function": "speed_show"
},
"digest": {
"length": 420.0,
"function_hash": "134615541409497262072005079817892726237"
},
"id": "CVE-2024-46679-3d3e7f6c",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a699781c79ecf6cfe67fb00a0331b4088c7c8466",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c",
"function": "speed_show"
},
"digest": {
"length": 420.0,
"function_hash": "134615541409497262072005079817892726237"
},
"id": "CVE-2024-46679-4a872411",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@842a40c7273ba1c1cb30dda50405b328de1d860e",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"2839974938788271000854881154941770496",
"162469270671122408021221579490778117149",
"313387100332343815024966037047716455535",
"291966336884999664692568286970135067759"
]
},
"id": "CVE-2024-46679-500b58e0",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9bba5955eed160102114d4cc00c3d399be9bdae4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c",
"function": "__ethtool_get_link_ksettings"
},
"digest": {
"length": 257.0,
"function_hash": "108421121169733529910517336852529949403"
},
"id": "CVE-2024-46679-67908808",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@94ab317024ba373d37340893d1c0358638935fbb",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"318623708332354879581591392214647124073",
"76764364796987035173986628251091763423",
"316368774919063895158150583151773845249"
]
},
"id": "CVE-2024-46679-7950e492",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a699781c79ecf6cfe67fb00a0331b4088c7c8466",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"2839974938788271000854881154941770496",
"162469270671122408021221579490778117149",
"313387100332343815024966037047716455535",
"291966336884999664692568286970135067759"
]
},
"id": "CVE-2024-46679-7e05db07",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1d6d9b5b1b95bfeccb84386a51b7e6c510ec13b2",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"318623708332354879581591392214647124073",
"76764364796987035173986628251091763423",
"316368774919063895158150583151773845249"
]
},
"id": "CVE-2024-46679-7ec6019a",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1d6d9b5b1b95bfeccb84386a51b7e6c510ec13b2",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"2839974938788271000854881154941770496",
"162469270671122408021221579490778117149",
"313387100332343815024966037047716455535",
"187730317734476384218145497497908831470"
]
},
"id": "CVE-2024-46679-80ea677d",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7a8d98b6d6484d3ad358510366022da080c37cbc",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c",
"function": "__ethtool_get_link_ksettings"
},
"digest": {
"length": 257.0,
"function_hash": "108421121169733529910517336852529949403"
},
"id": "CVE-2024-46679-868b3b98",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@842a40c7273ba1c1cb30dda50405b328de1d860e",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"2839974938788271000854881154941770496",
"162469270671122408021221579490778117149",
"313387100332343815024966037047716455535",
"187730317734476384218145497497908831470"
]
},
"id": "CVE-2024-46679-87e29f60",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec7b4f7f644018ac293cb1b02528a40a32917e62",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/ethtool.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"318623708332354879581591392214647124073",
"76764364796987035173986628251091763423",
"316368774919063895158150583151773845249"
]
},
"id": "CVE-2024-46679-8815e539",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec7b4f7f644018ac293cb1b02528a40a32917e62",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"2839974938788271000854881154941770496",
"162469270671122408021221579490778117149",
"313387100332343815024966037047716455535",
"291966336884999664692568286970135067759"
]
},
"id": "CVE-2024-46679-937a2135",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@94ab317024ba373d37340893d1c0358638935fbb",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c",
"function": "__ethtool_get_link_ksettings"
},
"digest": {
"length": 257.0,
"function_hash": "108421121169733529910517336852529949403"
},
"id": "CVE-2024-46679-978c8fd5",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9bba5955eed160102114d4cc00c3d399be9bdae4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c",
"function": "__ethtool_get_link_ksettings"
},
"digest": {
"length": 257.0,
"function_hash": "108421121169733529910517336852529949403"
},
"id": "CVE-2024-46679-ae562135",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a699781c79ecf6cfe67fb00a0331b4088c7c8466",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c",
"function": "__ethtool_get_link_ksettings"
},
"digest": {
"length": 257.0,
"function_hash": "108421121169733529910517336852529949403"
},
"id": "CVE-2024-46679-afabb8ae",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1d6d9b5b1b95bfeccb84386a51b7e6c510ec13b2",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/ethtool.c",
"function": "__ethtool_get_link_ksettings"
},
"digest": {
"length": 257.0,
"function_hash": "108421121169733529910517336852529949403"
},
"id": "CVE-2024-46679-b0a16c35",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec7b4f7f644018ac293cb1b02528a40a32917e62",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"318623708332354879581591392214647124073",
"76764364796987035173986628251091763423",
"316368774919063895158150583151773845249"
]
},
"id": "CVE-2024-46679-b83ffc42",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@94ab317024ba373d37340893d1c0358638935fbb",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c",
"function": "speed_show"
},
"digest": {
"length": 420.0,
"function_hash": "134615541409497262072005079817892726237"
},
"id": "CVE-2024-46679-b9a8f0a7",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9bba5955eed160102114d4cc00c3d399be9bdae4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c",
"function": "speed_show"
},
"digest": {
"length": 420.0,
"function_hash": "134615541409497262072005079817892726237"
},
"id": "CVE-2024-46679-c0623713",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7a8d98b6d6484d3ad358510366022da080c37cbc",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"318623708332354879581591392214647124073",
"76764364796987035173986628251091763423",
"316368774919063895158150583151773845249"
]
},
"id": "CVE-2024-46679-d2240b94",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@842a40c7273ba1c1cb30dda50405b328de1d860e",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c",
"function": "speed_show"
},
"digest": {
"length": 420.0,
"function_hash": "134615541409497262072005079817892726237"
},
"id": "CVE-2024-46679-da214c6d",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@94ab317024ba373d37340893d1c0358638935fbb",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ethtool/ioctl.c",
"function": "__ethtool_get_link_ksettings"
},
"digest": {
"length": 257.0,
"function_hash": "108421121169733529910517336852529949403"
},
"id": "CVE-2024-46679-ea6f80ab",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7a8d98b6d6484d3ad358510366022da080c37cbc",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/core/net-sysfs.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"2839974938788271000854881154941770496",
"162469270671122408021221579490778117149",
"313387100332343815024966037047716455535",
"291966336884999664692568286970135067759"
]
},
"id": "CVE-2024-46679-f54083f8",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a699781c79ecf6cfe67fb00a0331b4088c7c8466",
"signature_version": "v1"
}
]