# CVE-2022-50828: clk: zynqmp: Fix stack-out-of-bounds in strncpy\`

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.27% (percentile 11, 2026-11-26)
- **Published:** 2025-12-30T12:10:50.757Z
- **Modified:** 2026-06-17T05:24:15.507Z

## Who should check

- Anyone running Linux \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< 5dbfcf7b080306b65d9f756fadf46c9495793750; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< d9e2585c3bcecb1c83febad31b9f450e93d2509e; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< 0a07b13af04d0db7325018aaa83b5ffe864790c9; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< d66fea97671fcb516bd6d34bcc033f650ac7ee91; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< bce41e4ac6f5ca3b22a07e8cdadc12044bbf9d3b; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< dd80fb2dbf1cd8751efbe4e53e54056f56a9b115
- Anyone running Linux 5.2

## Description

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

clk: zynqmp: Fix stack-out-of-bounds in strncpy\`

"BUG: KASAN: stack-out-of-bounds in strncpy+0x30/0x68"

Linux-ATF interface is using 16 bytes of SMC payload. In case clock name is
longer than 15 bytes, string terminated NULL character will not be received
by Linux. Add explicit NULL character at last byte to fix issues when clock
name is longer.

This fixes below bug reported by KASAN:

 ==================================================================
 BUG: KASAN: stack-out-of-bounds in strncpy+0x30/0x68
 Read of size 1 at addr ffff0008c89a7410 by task swapper/0/1

 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.4.0-00396-g81ef9e7-dirty \#3
 Hardware name: Xilinx Versal vck190 Eval board revA (QSPI) (DT)
 Call trace:
  dump\_backtrace+0x0/0x1e8
  show\_stack+0x14/0x20
  dump\_stack+0xd4/0x108
  print\_address\_description.isra.0+0xbc/0x37c
  \_\_kasan\_report+0x144/0x198
  kasan\_report+0xc/0x18
  \_\_asan\_load1+0x5c/0x68
  strncpy+0x30/0x68
  zynqmp\_clock\_probe+0x238/0x7b8
  platform\_drv\_probe+0x6c/0xc8
  really\_probe+0x14c/0x418
  driver\_probe\_device+0x74/0x130
  \_\_device\_attach\_driver+0xc4/0xe8
  bus\_for\_each\_drv+0xec/0x150
  \_\_device\_attach+0x160/0x1d8
  device\_initial\_probe+0x10/0x18
  bus\_probe\_device+0xe0/0xf0
  device\_add+0x528/0x950
  of\_device\_add+0x5c/0x80
  of\_platform\_device\_create\_pdata+0x120/0x168
  of\_platform\_bus\_create+0x244/0x4e0
  of\_platform\_populate+0x50/0xe8
  zynqmp\_firmware\_probe+0x370/0x3a8
  platform\_drv\_probe+0x6c/0xc8
  really\_probe+0x14c/0x418
  driver\_probe\_device+0x74/0x130
  device\_driver\_attach+0x94/0xa0
  \_\_driver\_attach+0x70/0x108
  bus\_for\_each\_dev+0xe4/0x158
  driver\_attach+0x30/0x40
  bus\_add\_driver+0x21c/0x2b8
  driver\_register+0xbc/0x1d0
  \_\_platform\_driver\_register+0x7c/0x88
  zynqmp\_firmware\_driver\_init+0x1c/0x24
  do\_one\_initcall+0xa4/0x234
  kernel\_init\_freeable+0x1b0/0x24c
  kernel\_init+0x10/0x110
  ret\_from\_fork+0x10/0x18

 The buggy address belongs to the page:
 page:ffff0008f9be1c88 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0
 raw: 0008d00000000000 ffff0008f9be1c90 ffff0008f9be1c90 0000000000000000
 raw: 0000000000000000 0000000000000000 00000000ffffffff
 page dumped because: kasan: bad access detected

 addr ffff0008c89a7410 is located in stack of task swapper/0/1 at offset 112 in frame:
  zynqmp\_clock\_probe+0x0/0x7b8

 this frame has 3 objects:
  \[32, 44) 'response'
  \[64, 80) 'ret\_payload'
  \[96, 112) 'name'

 Memory state around the buggy address:
  ffff0008c89a7300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  ffff0008c89a7380: 00 00 00 00 f1 f1 f1 f1 00 04 f2 f2 00 00 f2 f2
 \>ffff0008c89a7400: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
                          ^
  ffff0008c89a7480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  ffff0008c89a7500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ==================================================================

## Affected and fixed versions

- Linux: \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< 5dbfcf7b080306b65d9f756fadf46c9495793750; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< d9e2585c3bcecb1c83febad31b9f450e93d2509e; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< 0a07b13af04d0db7325018aaa83b5ffe864790c9; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< d66fea97671fcb516bd6d34bcc033f650ac7ee91; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< bce41e4ac6f5ca3b22a07e8cdadc12044bbf9d3b; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< dd80fb2dbf1cd8751efbe4e53e54056f56a9b115 (cvelist)
- Linux: 5.2 (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-50828. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50828.md
Affected: Linux >= 5852b1365df4414523210e444ac7df1dec09acb4, < 5dbfcf7b080306b65d9f756fadf46c9495793750; >= 5852b1365df4414523210e444ac7df1dec09acb4, < d9e2585c3bcecb1c83febad31b9f450e93d2509e; >= 5852b1365df4414523210e444ac7df1dec09acb4, < 0a07b13af04d0db7325018aaa83b5ffe864790c9; >= 5852b1365df4414523210e4…
Fixed in: Linux 5dbfcf7b080306b65d9f756fadf46c9495793750, Linux 0a07b13af04d0db7325018aaa83b5ffe864790c9

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

There is no confirmed exploitation: CVE-2022-50828 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-50828?

It has no CVSS score yet. Unknown.

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

Linux \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< 5dbfcf7b080306b65d9f756fadf46c9495793750; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< d9e2585c3bcecb1c83febad31b9f450e93d2509e; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< 0a07b13af04d0db7325018aaa83b5ffe864790c9; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< d66fea97671fcb516bd6d34bcc033f650ac7ee91; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< bce41e4ac6f5ca3b22a07e8cdadc12044bbf9d3b; \>= 5852b1365df4414523210e444ac7df1dec09acb4, \< dd80fb2dbf1cd8751efbe4e53e54056f56a9b115; Linux 5.2.

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

Yes. Fixed in Linux 5dbfcf7b080306b65d9f756fadf46c9495793750, Linux 0a07b13af04d0db7325018aaa83b5ffe864790c9. No fix listed yet: follow the vendor advisory.

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

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

- other: <https://git.kernel.org/stable/c/5dbfcf7b080306b65d9f756fadf46c9495793750>
- other: <https://git.kernel.org/stable/c/d9e2585c3bcecb1c83febad31b9f450e93d2509e>
- other: <https://git.kernel.org/stable/c/0a07b13af04d0db7325018aaa83b5ffe864790c9>
- other: <https://git.kernel.org/stable/c/d66fea97671fcb516bd6d34bcc033f650ac7ee91>
- other: <https://git.kernel.org/stable/c/bce41e4ac6f5ca3b22a07e8cdadc12044bbf9d3b>
- other: <https://git.kernel.org/stable/c/dd80fb2dbf1cd8751efbe4e53e54056f56a9b115>

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

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