# CVE-2022-48781: crypto: af\_alg - get rid of alg\_memory\_allocated

> 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.27% (percentile 12, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-07-16T11:13:18.493Z
- **Modified:** 2026-06-17T05:16:10.767Z

## Who should check

- Anyone running Linux \>= 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, \< 9d06f489b9e901580159e21fdc29f73df7ed08dc; \>= 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, \< 25206111512de994dfc914f5b2972a22aa904ef3
- Anyone running Linux 5.16

## Description

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

crypto: af\_alg - get rid of alg\_memory\_allocated

alg\_memory\_allocated does not seem to be really used.

alg\_proto does have a .memory\_allocated field, but no
corresponding .sysctl\_mem.

This means sk\_has\_account() returns true, but all sk\_prot\_mem\_limits()
users will trigger a NULL dereference \[1\].

THis was not a problem until SO\_RESERVE\_MEM addition.

general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 \[\#1\] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range \[0x0000000000000008-0x000000000000000f\]
CPU: 1 PID: 3591 Comm: syz-executor153 Not tainted 5.17.0-rc3-syzkaller-00316-gb81b1829e7e3 \#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:sk\_prot\_mem\_limits include/net/sock.h:1523 \[inline\]
RIP: 0010:sock\_reserve\_memory+0x1d7/0x330 net/core/sock.c:1000
Code: 08 00 74 08 48 89 ef e8 27 20 bb f9 4c 03 7c 24 10 48 8b 6d 00 48 83 c5 08 48 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df \<80\> 3c 08 00 74 08 48 89 ef e8 fb 1f bb f9 48 8b 6d 00 4c 89 ff 48
RSP: 0018:ffffc90001f1fb68 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff88814aabc000 RCX: dffffc0000000000
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff90e18120
RBP: 0000000000000008 R08: dffffc0000000000 R09: fffffbfff21c3025
R10: fffffbfff21c3025 R11: 0000000000000000 R12: ffffffff8d109840
R13: 0000000000001002 R14: 0000000000000001 R15: 0000000000000001
FS:  0000555556e08300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc74416f130 CR3: 0000000073d9e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 \<TASK\>
 sock\_setsockopt+0x14a9/0x3a30 net/core/sock.c:1446
 \_\_sys\_setsockopt+0x5af/0x980 net/socket.c:2176
 \_\_do\_sys\_setsockopt net/socket.c:2191 \[inline\]
 \_\_se\_sys\_setsockopt net/socket.c:2188 \[inline\]
 \_\_x64\_sys\_setsockopt+0xb1/0xc0 net/socket.c:2188
 do\_syscall\_x64 arch/x86/entry/common.c:50 \[inline\]
 do\_syscall\_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae
RIP: 0033:0x7fc7440fddc9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 \<48\> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe98f07968 EFLAGS: 00000246 ORIG\_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fc7440fddc9
RDX: 0000000000000049 RSI: 0000000000000001 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000004 R09: 00007ffe98f07990
R10: 0000000020000000 R11: 0000000000000246 R12: 00007ffe98f0798c
R13: 00007ffe98f079a0 R14: 00007ffe98f079e0 R15: 0000000000000000
 \</TASK\>
Modules linked in:
---\[ end trace 0000000000000000 \]---
RIP: 0010:sk\_prot\_mem\_limits include/net/sock.h:1523 \[inline\]
RIP: 0010:sock\_reserve\_memory+0x1d7/0x330 net/core/sock.c:1000
Code: 08 00 74 08 48 89 ef e8 27 20 bb f9 4c 03 7c 24 10 48 8b 6d 00 48 83 c5 08 48 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df \<80\> 3c 08 00 74 08 48 89 ef e8 fb 1f bb f9 48 8b 6d 00 4c 89 ff 48
RSP: 0018:ffffc90001f1fb68 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff88814aabc000 RCX: dffffc0000000000
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff90e18120
RBP: 0000000000000008 R08: dffffc0000000000 R09: fffffbfff21c3025
R10: fffffbfff21c3025 R11: 0000000000000000 R12: ffffffff8d109840
R13: 0000000000001002 R14: 0000000000000001 R15: 0000000000000001
FS:  0000555556e08300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc74416f130 CR3: 0000000073d9e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000

## Affected and fixed versions

- Linux: \>= 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, \< 9d06f489b9e901580159e21fdc29f73df7ed08dc; \>= 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, \< 25206111512de994dfc914f5b2972a22aa904ef3 (cvelist)
- Linux: 5.16 (cvelist)

## Mitigation

- Upgrade Linux to 25206111512de994dfc914f5b2972a22aa904ef3 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-48781. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-48781.md
Affected: Linux >= 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, < 9d06f489b9e901580159e21fdc29f73df7ed08dc; >= 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, < 25206111512de994dfc914f5b2972a22aa904ef3; Linux 5.16
Fixed in: Linux 9d06f489b9e901580159e21fdc29f73df7ed08dc, Linux 25206111512de994dfc914f5b2972a22aa904ef3

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

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

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

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

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

Linux \>= 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, \< 9d06f489b9e901580159e21fdc29f73df7ed08dc; \>= 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133, \< 25206111512de994dfc914f5b2972a22aa904ef3; Linux 5.16.

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

Yes. Fixed in Linux 9d06f489b9e901580159e21fdc29f73df7ed08dc, Linux 25206111512de994dfc914f5b2972a22aa904ef3. Upgrade Linux to 25206111512de994dfc914f5b2972a22aa904ef3 or later.

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

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/9d06f489b9e901580159e21fdc29f73df7ed08dc>
- patch: <https://git.kernel.org/stable/c/25206111512de994dfc914f5b2972a22aa904ef3>

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

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