# CVE-2022-50341: cifs: fix oops during encryption

> 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.16% (percentile 2, 2026-11-26)
- **Published:** 2025-09-16T16:11:20.838Z
- **Modified:** 2026-08-05T08:58:18.553Z

## Who should check

- Anyone running Linux \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< e8e2861cc3258dbe407d01ea8c59bb5a53132301; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< fe6ea044c4f05706cb71040055b1c70c6c8275e0; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< bf0543b93740916ee91956f9a63da6fc0d79daaa; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< a13e51760703f71c25d5fc1f4a62dfa4b0cc80e9; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< e8d16a54842d609fd4a3ed2d81d4333d6329aa94; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< f7f291e14dde32a07b1f0aa06921d28f875a7b54
- Anyone running Linux 4.11

## Description

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

cifs: fix oops during encryption

When running xfstests against Azure the following oops occurred on an
arm64 system

  Unable to handle kernel write to read-only memory at virtual address
  ffff0001221cf000
  Mem abort info:
    ESR = 0x9600004f
    EC = 0x25: DABT (current EL), IL = 32 bits
    SET = 0, FnV = 0
    EA = 0, S1PTW = 0
    FSC = 0x0f: level 3 permission fault
  Data abort info:
    ISV = 0, ISS = 0x0000004f
    CM = 0, WnR = 1
  swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000294f3000
  \[ffff0001221cf000\] pgd=18000001ffff8003, p4d=18000001ffff8003,
  pud=18000001ff82e003, pmd=18000001ff71d003, pte=00600001221cf787
  Internal error: Oops: 9600004f \[\#1\] PREEMPT SMP
  ...
  pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)
  pc : \_\_memcpy+0x40/0x230
  lr : scatterwalk\_copychunks+0xe0/0x200
  sp : ffff800014e92de0
  x29: ffff800014e92de0 x28: ffff000114f9de80 x27: 0000000000000008
  x26: 0000000000000008 x25: ffff800014e92e78 x24: 0000000000000008
  x23: 0000000000000001 x22: 0000040000000000 x21: ffff000000000000
  x20: 0000000000000001 x19: ffff0001037c4488 x18: 0000000000000014
  x17: 235e1c0d6efa9661 x16: a435f9576b6edd6c x15: 0000000000000058
  x14: 0000000000000001 x13: 0000000000000008 x12: ffff000114f2e590
  x11: ffffffffffffffff x10: 0000040000000000 x9 : ffff8000105c3580
  x8 : 2e9413b10000001a x7 : 534b4410fb86b005 x6 : 534b4410fb86b005
  x5 : ffff0001221cf008 x4 : ffff0001037c4490 x3 : 0000000000000001
  x2 : 0000000000000008 x1 : ffff0001037c4488 x0 : ffff0001221cf000
  Call trace:
   \_\_memcpy+0x40/0x230
   scatterwalk\_map\_and\_copy+0x98/0x100
   crypto\_ccm\_encrypt+0x150/0x180
   crypto\_aead\_encrypt+0x2c/0x40
   crypt\_message+0x750/0x880
   smb3\_init\_transform\_rq+0x298/0x340
   smb\_send\_rqst.part.11+0xd8/0x180
   smb\_send\_rqst+0x3c/0x100
   compound\_send\_recv+0x534/0xbc0
   smb2\_query\_info\_compound+0x32c/0x440
   smb2\_set\_ea+0x438/0x4c0
   cifs\_xattr\_set+0x5d4/0x7c0

This is because in scatterwalk\_copychunks(), we attempted to write to
a buffer (@sign) that was allocated in the stack (vmalloc area) by
crypt\_message() and thus accessing its remaining 8 (x2) bytes ended up
crossing a page boundary.

To simply fix it, we could just pass @sign kmalloc'd from
crypt\_message() and then we're done.  Luckily, we don't seem to pass
any other vmalloc'd buffers in smb\_rqst::rq\_iov...

Instead, let's map the correct pages and offsets from vmalloc buffers
as well in cifs\_sg\_set\_buf() and then avoiding such oopses.

## Affected and fixed versions

- Linux: \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< e8e2861cc3258dbe407d01ea8c59bb5a53132301; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< fe6ea044c4f05706cb71040055b1c70c6c8275e0; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< bf0543b93740916ee91956f9a63da6fc0d79daaa; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< a13e51760703f71c25d5fc1f4a62dfa4b0cc80e9; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< e8d16a54842d609fd4a3ed2d81d4333d6329aa94; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< f7f291e14dde32a07b1f0aa06921d28f875a7b54 (cvelist)
- Linux: 4.11 (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-50341. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50341.md
Affected: Linux >= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, < e8e2861cc3258dbe407d01ea8c59bb5a53132301; >= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, < fe6ea044c4f05706cb71040055b1c70c6c8275e0; >= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, < bf0543b93740916ee91956f9a63da6fc0d79daaa; >= 026e93dc0a3eefb0be060bc…
Fixed in: no fixed version listed yet

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

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

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

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

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

Linux \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< e8e2861cc3258dbe407d01ea8c59bb5a53132301; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< fe6ea044c4f05706cb71040055b1c70c6c8275e0; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< bf0543b93740916ee91956f9a63da6fc0d79daaa; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< a13e51760703f71c25d5fc1f4a62dfa4b0cc80e9; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< e8d16a54842d609fd4a3ed2d81d4333d6329aa94; \>= 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398, \< f7f291e14dde32a07b1f0aa06921d28f875a7b54; Linux 4.11.

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

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

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

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/e8e2861cc3258dbe407d01ea8c59bb5a53132301>
- patch: <https://git.kernel.org/stable/c/fe6ea044c4f05706cb71040055b1c70c6c8275e0>
- patch: <https://git.kernel.org/stable/c/bf0543b93740916ee91956f9a63da6fc0d79daaa>
- patch: <https://git.kernel.org/stable/c/a13e51760703f71c25d5fc1f4a62dfa4b0cc80e9>
- patch: <https://git.kernel.org/stable/c/e8d16a54842d609fd4a3ed2d81d4333d6329aa94>
- patch: <https://git.kernel.org/stable/c/f7f291e14dde32a07b1f0aa06921d28f875a7b54>

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

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