igc: Reinstate IGC_REMOVED logic and implement it properly
In the Linux kernel, the following vulnerability has been resolved: igc: Reinstate IGC_REMOVED logic and implement it properly The initially merged version of the igc driver code (via commit 146740f9abc4, "igc: Add support for PF") contained the following IGC_REMOVED checks in the igc_rd32/wr32() MMIO accessors: u32 igc_rd32(struct igc_hw *hw, u32 reg) { u8 __iomem *hw_addr = READ_ONCE(hw->hw_addr); u32 value = 0; if (IGC_REMOVED(hw_addr)) return ~value; value = readl(&hw_addr[reg]); /* reads should not return all F's */ if (!(~value) && (!reg || !(~readl(hw_addr)))) hw->hw_addr = NULL; return value; } And: #define wr32(reg, val) \ do { \ u8 __iomem *hw_addr = READ_ONCE((hw)->hw_addr); \ if (!IGC_REMOVED(hw_addr)) \ writel((val), &hw_addr[(reg)]); \ } while (0) E.g. igb has similar checks in its MMIO accessors, and has a similar macro E1000_REMOVED, which is implemented as follows: #define E1000_REMOVED(h) unlikely(!(h)) These checks serve to detect and take note of an 0xffffffff MMIO read return from the device, which can be caused by a PCIe link flap or some other kind of PCI bus error, and to avoid performing MMIO reads and writes from that point onwards. However, the IGC_REMOVED macro was not originally implemented: #ifndef IGC_REMOVED #define IGC_REMOVED(a) (0) #endif /* IGC_REMOVED */ This led to the IGC_REMOVED logic to be removed entirely in a subsequent commit (commit 3c215fb18e70, "igc: remove IGC_REMOVED function"), with the rationale that such checks matter only f
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.134, 5.15.58, 5.18.15, 5.4.208
- CVEs
- CVE-2022-49605
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 00:59 UTC · Revision 1
Source evidence
igc: Reinstate IGC_REMOVED logic and implement it properly
core-osv · Original sourcePublished 26 Feb 2025, 02:23 UTC
In the Linux kernel, the following vulnerability has been resolved: igc: Reinstate IGC_REMOVED logic and implement it properly The initially merged version of the igc driver code (via commit 146740f9abc4, "igc: Add support for PF") contained the following IGC_REMOVED checks in the igc_rd32/wr32() MMIO accessors: u32 igc_rd32(struct igc_hw *hw, u32 reg) { u8 __iomem *hw_addr = READ_ONCE(hw->hw_addr); u32 value = 0; if (IGC_REMOVED(hw_addr)) return ~value; value = readl(&hw_addr[reg]); /* reads should not return all F's */ if (!(~value) && (!reg || !(~readl(hw_addr)))) hw->hw_addr = NULL; return value; } And: #define wr32(reg, val) \ do { \ u8 __iomem *hw_addr = READ_ONCE((hw)->hw_addr); \ if (!IGC_REMOVED(hw_addr)) \ writel((val), &hw_addr[(reg)]); \ } while (0) E.g. igb has similar checks in its MMIO accessors, and has a similar macro E1000_REMOVED, which is implemented as follows: #define E1000_REMOVED(h) unlikely(!(h)) These checks serve to detect and take note of an 0xffffffff MMIO read return from the device, which can be caused by a PCIe link flap or some other kind of PCI bus error, and to avoid performing MMIO reads and writes from that point onwards. However, the IGC_REMOVED macro was not originally implemented: #ifndef IGC_REMOVED #define IGC_REMOVED(a) (0) #endif /* IGC_REMOVED */ This led to the IGC_REMOVED logic to be removed entirely in a subsequent commit (commit 3c215fb18e70, "igc: remove IGC_REMOVED function"), with the rationale that such checks matter only f
osv:CVE-2022-49605
Kernel
Fixed versions: 5.4.208, 5.10.134, 5.15.58, 5.18.15
Complete source record
{
"id": "f014fe03ce59796f2a6cfc1ef30705841a9fc326380f26bf1d5e3b371cf8e255",
"url": "https://osv.dev/vulnerability/CVE-2022-49605",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "igc: Reinstate IGC_REMOVED logic and implement it properly",
"summary": "In the Linux kernel, the following vulnerability has been resolved: igc: Reinstate IGC_REMOVED logic and implement it properly The initially merged version of the igc driver code (via commit 146740f9abc4, \"igc: Add support for PF\") contained the following IGC_REMOVED checks in the igc_rd32/wr32() MMIO accessors: u32 igc_rd32(struct igc_hw *hw, u32 reg) { u8 __iomem *hw_addr = READ_ONCE(hw->hw_addr); u32 value = 0; if (IGC_REMOVED(hw_addr)) return ~value; value = readl(&hw_addr[reg]); /* reads should not return all F's */ if (!(~value) && (!reg || !(~readl(hw_addr)))) hw->hw_addr = NULL; return value; } And: #define wr32(reg, val) \\ do { \\ u8 __iomem *hw_addr = READ_ONCE((hw)->hw_addr); \\ if (!IGC_REMOVED(hw_addr)) \\ writel((val), &hw_addr[(reg)]); \\ } while (0) E.g. igb has similar checks in its MMIO accessors, and has a similar macro E1000_REMOVED, which is implemented as follows: #define E1000_REMOVED(h) unlikely(!(h)) These checks serve to detect and take note of an 0xffffffff MMIO read return from the device, which can be caused by a PCIe link flap or some other kind of PCI bus error, and to avoid performing MMIO reads and writes from that point onwards. However, the IGC_REMOVED macro was not originally implemented: #ifndef IGC_REMOVED #define IGC_REMOVED(a) (0) #endif /* IGC_REMOVED */ This led to the IGC_REMOVED logic to be removed entirely in a subsequent commit (commit 3c215fb18e70, \"igc: remove IGC_REMOVED function\"), with the rationale that such checks matter only f",
"evidence": "osv:CVE-2022-49605",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.4.208",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.134",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.58",
"evidence": "/affected/1/ranges"
},
{
"value": "5.18.15",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2022-49605",
"aliases": [
"CVE-2022-49605"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "146740f9abc4976e4f0af1aa302efee1c699d2e4"
},
{
"fixed": "16cb6717f4f42487ef10583eb8bc98e7d1e33d65"
},
{
"fixed": "77836dbe35382aaf8108489060c5c89530c77494"
},
{
"fixed": "e75b73081f1ec169518773626c2ff3950476660b"
},
{
"fixed": "70965b6e5c03aa70cc754af1226b9f9cde0c4bf3"
},
{
"fixed": "7c1ddcee5311f3315096217881d2dbe47cc683f9"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49605.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.20.0"
},
{
"fixed": "5.4.208"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.134"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.58"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "5.18.15"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49605.json"
}
}
],
"modified": "2026-10-28T02:30:41.113733945Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/16cb6717f4f42487ef10583eb8bc98e7d1e33d65",
"https://git.kernel.org/stable/c/70965b6e5c03aa70cc754af1226b9f9cde0c4bf3",
"https://git.kernel.org/stable/c/77836dbe35382aaf8108489060c5c89530c77494",
"https://git.kernel.org/stable/c/7c1ddcee5311f3315096217881d2dbe47cc683f9",
"https://git.kernel.org/stable/c/e75b73081f1ec169518773626c2ff3950476660b",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49605.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-49605",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49605.json"
}
},
"related_cves": [
{
"value": "CVE-2022-49605",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 508836,
"published_at": "2025-02-26T02:23:30.873+00:00"
}