# CVE-2022-48847: watch\_queue: Fix filter limit check

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.33% (percentile 18, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2024-07-16T12:25:15.804Z
- **Modified:** 2026-08-05T08:52:37.538Z

## Who should check

- Anyone running Linux \>= c73be61cede5882f9605a852414db559c0ebedfd, \< 648895da69ced90ca770fd941c3d9479a9d72c16; \>= c73be61cede5882f9605a852414db559c0ebedfd, \< 1b09f28f70a5046acd64138075ae3f095238b045; \>= c73be61cede5882f9605a852414db559c0ebedfd, \< b36588ebbcef74583824c08352e75838d6fb4ff2; \>= c73be61cede5882f9605a852414db559c0ebedfd, \< c993ee0f9f81caf5767a50d1faeba39a0dc82af2
- Anyone running Linux 5.8

## Description

In the Linux kernel, the following vulnerability has been resolved:

watch\_queue: Fix filter limit check

In watch\_queue\_set\_filter(), there are a couple of places where we check
that the filter type value does not exceed what the type\_filter bitmap
can hold.  One place calculates the number of bits by:

   if (tf\[i\].type \>= sizeof(wfilter-\>type\_filter) \* 8)

which is fine, but the second does:

   if (tf\[i\].type \>= sizeof(wfilter-\>type\_filter) \* BITS\_PER\_LONG)

which is not.  This can lead to a couple of out-of-bounds writes due to
a too-large type:

 (1) \_\_set\_bit() on wfilter-\>type\_filter
 (2) Writing more elements in wfilter-\>filters\[\] than we allocated.

Fix this by just using the proper WATCH\_TYPE\_\_NR instead, which is the
number of types we actually know about.

The bug may cause an oops looking something like:

  BUG: KASAN: slab-out-of-bounds in watch\_queue\_set\_filter+0x659/0x740
  Write of size 4 at addr ffff88800d2c66bc by task watch\_queue\_oob/611
  ...
  Call Trace:
   \<TASK\>
   dump\_stack\_lvl+0x45/0x59
   print\_address\_description.constprop.0+0x1f/0x150
   ...
   kasan\_report.cold+0x7f/0x11b
   ...
   watch\_queue\_set\_filter+0x659/0x740
   ...
   \_\_x64\_sys\_ioctl+0x127/0x190
   do\_syscall\_64+0x43/0x90
   entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae

  Allocated by task 611:
   kasan\_save\_stack+0x1e/0x40
   \_\_kasan\_kmalloc+0x81/0xa0
   watch\_queue\_set\_filter+0x23a/0x740
   \_\_x64\_sys\_ioctl+0x127/0x190
   do\_syscall\_64+0x43/0x90
   entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae

  The buggy address belongs to the object at ffff88800d2c66a0
   which belongs to the cache kmalloc-32 of size 32
  The buggy address is located 28 bytes inside of
   32-byte region \[ffff88800d2c66a0, ffff88800d2c66c0)

## Affected and fixed versions

- Linux: \>= c73be61cede5882f9605a852414db559c0ebedfd, \< 648895da69ced90ca770fd941c3d9479a9d72c16; \>= c73be61cede5882f9605a852414db559c0ebedfd, \< 1b09f28f70a5046acd64138075ae3f095238b045; \>= c73be61cede5882f9605a852414db559c0ebedfd, \< b36588ebbcef74583824c08352e75838d6fb4ff2; \>= c73be61cede5882f9605a852414db559c0ebedfd, \< c993ee0f9f81caf5767a50d1faeba39a0dc82af2 (cvelist)
- Linux: 5.8 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-48847.md
Affected: Linux >= c73be61cede5882f9605a852414db559c0ebedfd, < 648895da69ced90ca770fd941c3d9479a9d72c16; >= c73be61cede5882f9605a852414db559c0ebedfd, < 1b09f28f70a5046acd64138075ae3f095238b045; >= c73be61cede5882f9605a852414db559c0ebedfd, < b36588ebbcef74583824c08352e75838d6fb4ff2; >= c73be61cede5882f9605a85…
Fixed in: Linux 648895da69ced90ca770fd941c3d9479a9d72c16, Linux 1b09f28f70a5046acd64138075ae3f095238b045

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-48847 being exploited?

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= c73be61cede5882f9605a852414db559c0ebedfd, \< 648895da69ced90ca770fd941c3d9479a9d72c16; \>= c73be61cede5882f9605a852414db559c0ebedfd, \< 1b09f28f70a5046acd64138075ae3f095238b045; \>= c73be61cede5882f9605a852414db559c0ebedfd, \< b36588ebbcef74583824c08352e75838d6fb4ff2; \>= c73be61cede5882f9605a852414db559c0ebedfd, \< c993ee0f9f81caf5767a50d1faeba39a0dc82af2; Linux 5.8.

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

Yes. Fixed in Linux 648895da69ced90ca770fd941c3d9479a9d72c16, Linux 1b09f28f70a5046acd64138075ae3f095238b045. No fix listed yet: follow the vendor advisory.

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

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/648895da69ced90ca770fd941c3d9479a9d72c16>
- patch: <https://git.kernel.org/stable/c/1b09f28f70a5046acd64138075ae3f095238b045>
- patch: <https://git.kernel.org/stable/c/b36588ebbcef74583824c08352e75838d6fb4ff2>
- patch: <https://git.kernel.org/stable/c/c993ee0f9f81caf5767a50d1faeba39a0dc82af2>

## 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-48847>

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