# CVE-2022-49282: f2fs: quota: fix loop condition at f2fs\_quota\_sync()

> 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, CNA) `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.29% (percentile 14, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-02-26T01:56:23.679Z
- **Modified:** 2026-06-17T05:17:35.490Z

## Who should check

- Anyone running Linux \>= a02982545e61020c23f411b073ba5171381138e4, \< f1d5946d47c0827bae39e1537959ce8d6f0224c5; \>= 2d586a3f5b7ec2f5a939db4abc9aa053c237545c, \< e58ee6bd939b773675240f5d0f5b88a367c037c4; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< f9156db0987f1b426015d56505e2c58dee70c90d; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< e9ebf1e8fc50b6a9336f9aea1082d7845e568d0e; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< 724469814d805820cd37ea789769dba94123ff1a; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< 680af5b824a52faa819167628665804a14f0e0df; 9dd5052a8a8be252990c1bb451b51f32529411ef; 699a077aa087c17cf29c7170db71a34141e2effe; \>= 5.4.148, \< 5.4.189; \>= 5.10.67, \< 5.10.110; …
- Anyone running Linux 5.15

## Description

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

f2fs: quota: fix loop condition at f2fs\_quota\_sync()

cnt should be passed to sb\_has\_quota\_active() instead of type to check
active quota properly.

Moreover, when the type is -1, the compiler with enough inline knowledge
can discard sb\_has\_quota\_active() check altogether, causing a NULL pointer
dereference at the following inode\_lock(dqopt-\>files\[cnt\]):

\[    2.796010\] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000a0
\[    2.796024\] Mem abort info:
\[    2.796025\]   ESR = 0x96000005
\[    2.796028\]   EC = 0x25: DABT (current EL), IL = 32 bits
\[    2.796029\]   SET = 0, FnV = 0
\[    2.796031\]   EA = 0, S1PTW = 0
\[    2.796032\] Data abort info:
\[    2.796034\]   ISV = 0, ISS = 0x00000005
\[    2.796035\]   CM = 0, WnR = 0
\[    2.796046\] user pgtable: 4k pages, 39-bit VAs, pgdp=00000003370d1000
\[    2.796048\] \[00000000000000a0\] pgd=0000000000000000, pud=0000000000000000
\[    2.796051\] Internal error: Oops: 96000005 \[\#1\] PREEMPT SMP
\[    2.796056\] CPU: 7 PID: 640 Comm: f2fs\_ckpt-259:7 Tainted: G S                5.4.179-arter97-r8-64666-g2f16e087f9d8 \#1
\[    2.796057\] Hardware name: Qualcomm Technologies, Inc. Lahaina MTP lemonadep (DT)
\[    2.796059\] pstate: 80c00005 (Nzcv daif +PAN +UAO)
\[    2.796065\] pc : down\_write+0x28/0x70
\[    2.796070\] lr : f2fs\_quota\_sync+0x100/0x294
\[    2.796071\] sp : ffffffa3f48ffc30
\[    2.796073\] x29: ffffffa3f48ffc30 x28: 0000000000000000
\[    2.796075\] x27: ffffffa3f6d718b8 x26: ffffffa415fe9d80
\[    2.796077\] x25: ffffffa3f7290048 x24: 0000000000000001
\[    2.796078\] x23: 0000000000000000 x22: ffffffa3f7290000
\[    2.796080\] x21: ffffffa3f72904a0 x20: ffffffa3f7290110
\[    2.796081\] x19: ffffffa3f77a9800 x18: ffffffc020aae038
\[    2.796083\] x17: ffffffa40e38e040 x16: ffffffa40e38e6d0
\[    2.796085\] x15: ffffffa40e38e6cc x14: ffffffa40e38e6d0
\[    2.796086\] x13: 00000000000004f6 x12: 00162c44ff493000
\[    2.796088\] x11: 0000000000000400 x10: ffffffa40e38c948
\[    2.796090\] x9 : 0000000000000000 x8 : 00000000000000a0
\[    2.796091\] x7 : 0000000000000000 x6 : 0000d1060f00002a
\[    2.796093\] x5 : ffffffa3f48ff718 x4 : 000000000000000d
\[    2.796094\] x3 : 00000000060c0000 x2 : 0000000000000001
\[    2.796096\] x1 : 0000000000000000 x0 : 00000000000000a0
\[    2.796098\] Call trace:
\[    2.796100\]  down\_write+0x28/0x70
\[    2.796102\]  f2fs\_quota\_sync+0x100/0x294
\[    2.796104\]  block\_operations+0x120/0x204
\[    2.796106\]  f2fs\_write\_checkpoint+0x11c/0x520
\[    2.796107\]  \_\_checkpoint\_and\_complete\_reqs+0x7c/0xd34
\[    2.796109\]  issue\_checkpoint\_thread+0x6c/0xb8
\[    2.796112\]  kthread+0x138/0x414
\[    2.796114\]  ret\_from\_fork+0x10/0x18
\[    2.796117\] Code: aa0803e0 aa1f03e1 52800022 aa0103e9 (c8e97d02)
\[    2.796120\] ---\[ end trace 96e942e8eb6a0b53 \]---
\[    2.800116\] Kernel panic - not syncing: Fatal exception
\[    2.800120\] SMP: stopping secondary CPUs

## Affected and fixed versions

- Linux: \>= a02982545e61020c23f411b073ba5171381138e4, \< f1d5946d47c0827bae39e1537959ce8d6f0224c5; \>= 2d586a3f5b7ec2f5a939db4abc9aa053c237545c, \< e58ee6bd939b773675240f5d0f5b88a367c037c4; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< f9156db0987f1b426015d56505e2c58dee70c90d; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< e9ebf1e8fc50b6a9336f9aea1082d7845e568d0e; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< 724469814d805820cd37ea789769dba94123ff1a; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< 680af5b824a52faa819167628665804a14f0e0df; 9dd5052a8a8be252990c1bb451b51f32529411ef; 699a077aa087c17cf29c7170db71a34141e2effe; \>= 5.4.148, \< 5.4.189; \>= 5.10.67, \< 5.10.110; … (cvelist)
- Linux: 5.15 (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-49282. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49282.md
Affected: Linux >= a02982545e61020c23f411b073ba5171381138e4, < f1d5946d47c0827bae39e1537959ce8d6f0224c5; >= 2d586a3f5b7ec2f5a939db4abc9aa053c237545c, < e58ee6bd939b773675240f5d0f5b88a367c037c4; >= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, < f9156db0987f1b426015d56505e2c58dee70c90d; >= 9de71ede81e6d1a111fdd86…
Fixed in: Linux 724469814d805820cd37ea789769dba94123ff1a, Linux 680af5b824a52faa819167628665804a14f0e0df, Linux 5.4.189, Linux 5.10.110

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

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

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

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

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

Linux \>= a02982545e61020c23f411b073ba5171381138e4, \< f1d5946d47c0827bae39e1537959ce8d6f0224c5; \>= 2d586a3f5b7ec2f5a939db4abc9aa053c237545c, \< e58ee6bd939b773675240f5d0f5b88a367c037c4; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< f9156db0987f1b426015d56505e2c58dee70c90d; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< e9ebf1e8fc50b6a9336f9aea1082d7845e568d0e; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< 724469814d805820cd37ea789769dba94123ff1a; \>= 9de71ede81e6d1a111fdd868b2d78d459fa77f80, \< 680af5b824a52faa819167628665804a14f0e0df; 9dd5052a8a8be252990c1bb451b51f32529411ef; 699a077aa087c17cf29c7170db71a34141e2effe; \>= 5.4.148, \< 5.4.189; \>= 5.10.67, \< 5.10.110; …; Linux 5.15.

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

Yes. Fixed in Linux 724469814d805820cd37ea789769dba94123ff1a, Linux 680af5b824a52faa819167628665804a14f0e0df, Linux 5.4.189, Linux 5.10.110. No fix listed yet: follow the vendor advisory.

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

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/f1d5946d47c0827bae39e1537959ce8d6f0224c5>
- patch: <https://git.kernel.org/stable/c/e58ee6bd939b773675240f5d0f5b88a367c037c4>
- patch: <https://git.kernel.org/stable/c/f9156db0987f1b426015d56505e2c58dee70c90d>
- patch: <https://git.kernel.org/stable/c/e9ebf1e8fc50b6a9336f9aea1082d7845e568d0e>
- patch: <https://git.kernel.org/stable/c/724469814d805820cd37ea789769dba94123ff1a>
- patch: <https://git.kernel.org/stable/c/680af5b824a52faa819167628665804a14f0e0df>

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

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