# CVE-2022-49605: igc: Reinstate IGC\_REMOVED logic and implement it properly

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.28% (percentile 14, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-02-26T02:23:30.873Z
- **Modified:** 2026-06-17T05:18:36.307Z

## Who should check

- Anyone running Linux \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 16cb6717f4f42487ef10583eb8bc98e7d1e33d65; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 77836dbe35382aaf8108489060c5c89530c77494; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< e75b73081f1ec169518773626c2ff3950476660b; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 70965b6e5c03aa70cc754af1226b9f9cde0c4bf3; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 7c1ddcee5311f3315096217881d2dbe47cc683f9
- Anyone running Linux 4.20

## Description

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 for
virtualization and that igc does not support virtualization -- but a
PCIe device can become detached even without virtualization being in
use, and without proper checks, a PCIe bus error affecting an igc
adapter will lead to various NULL pointer dereferences, as the first
access after the error will set hw-\>hw\_addr to NULL, and subsequent
accesses will blindly dereference this now-NULL pointer.

This patch reinstates the IGC\_REMOVED checks in igc\_rd32/wr32(), and
implements IGC\_REMOVED the way it is done for igb, by checking for the
unlikely() case of hw\_addr being NULL.  This change prevents the oopses
seen when a PCIe link flap occurs on an igc adapter.

## Affected and fixed versions

- Linux: \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 16cb6717f4f42487ef10583eb8bc98e7d1e33d65; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 77836dbe35382aaf8108489060c5c89530c77494; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< e75b73081f1ec169518773626c2ff3950476660b; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 70965b6e5c03aa70cc754af1226b9f9cde0c4bf3; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 7c1ddcee5311f3315096217881d2dbe47cc683f9 (cvelist)
- Linux: 4.20 (cvelist)

## Mitigation

- Upgrade Linux to 7c1ddcee5311f3315096217881d2dbe47cc683f9 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49605. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49605.md
Affected: Linux >= 146740f9abc4976e4f0af1aa302efee1c699d2e4, < 16cb6717f4f42487ef10583eb8bc98e7d1e33d65; >= 146740f9abc4976e4f0af1aa302efee1c699d2e4, < 77836dbe35382aaf8108489060c5c89530c77494; >= 146740f9abc4976e4f0af1aa302efee1c699d2e4, < e75b73081f1ec169518773626c2ff3950476660b; >= 146740f9abc4976e4f0af1a…
Fixed in: Linux 16cb6717f4f42487ef10583eb8bc98e7d1e33d65, Linux 77836dbe35382aaf8108489060c5c89530c77494, Linux 70965b6e5c03aa70cc754af1226b9f9cde0c4bf3, Linux 7c1ddcee5311f3315096217881d2dbe47cc683f9

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-49605 being exploited?

There is no confirmed exploitation: CVE-2022-49605 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49605?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49605?

Linux \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 16cb6717f4f42487ef10583eb8bc98e7d1e33d65; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 77836dbe35382aaf8108489060c5c89530c77494; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< e75b73081f1ec169518773626c2ff3950476660b; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 70965b6e5c03aa70cc754af1226b9f9cde0c4bf3; \>= 146740f9abc4976e4f0af1aa302efee1c699d2e4, \< 7c1ddcee5311f3315096217881d2dbe47cc683f9; Linux 4.20.

### Is there a fix for CVE-2022-49605?

Yes. Fixed in Linux 16cb6717f4f42487ef10583eb8bc98e7d1e33d65, Linux 77836dbe35382aaf8108489060c5c89530c77494, Linux 70965b6e5c03aa70cc754af1226b9f9cde0c4bf3, Linux 7c1ddcee5311f3315096217881d2dbe47cc683f9. Upgrade Linux to 7c1ddcee5311f3315096217881d2dbe47cc683f9 or later.

### How do I check if I'm affected by CVE-2022-49605?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/16cb6717f4f42487ef10583eb8bc98e7d1e33d65>
- patch: <https://git.kernel.org/stable/c/77836dbe35382aaf8108489060c5c89530c77494>
- patch: <https://git.kernel.org/stable/c/e75b73081f1ec169518773626c2ff3950476660b>
- patch: <https://git.kernel.org/stable/c/70965b6e5c03aa70cc754af1226b9f9cde0c4bf3>
- patch: <https://git.kernel.org/stable/c/7c1ddcee5311f3315096217881d2dbe47cc683f9>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49605>

HTML: <https://flawdb.com/CVE-2022-49605> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49605>
