# CVE-2023-54170: keys: Fix linking a duplicate key to a keyring's assoc\_array

> 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:08:44.763Z
- **Modified:** 2026-06-17T06:46:55.957Z

## Who should check

- Anyone running Linux \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 65bd66a794bfa059375ec834885bb610d75c0182; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 0a6b0ca58685be34979236f83f2b322635b80b32; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 9aecfebea24fe6071ace5cc9fd6d690b87276bbb; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 00edfa6d4fe022942e2f2e6f3294ff13ef78b15c; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< e091bb55af9a930801f83df78195a908a76e1479; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< d55901522f96082a43b9842d34867363c0cdbac5
- Anyone running Linux 5.3

## Description

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

keys: Fix linking a duplicate key to a keyring's assoc\_array

When making a DNS query inside the kernel using dns\_query(), the request
code can in rare cases end up creating a duplicate index key in the
assoc\_array of the destination keyring. It is eventually found by
a BUG\_ON() check in the assoc\_array implementation and results in
a crash.

Example report:
\[2158499.700025\] kernel BUG at ../lib/assoc\_array.c:652!
\[2158499.700039\] invalid opcode: 0000 \[\#1\] SMP PTI
\[2158499.700065\] CPU: 3 PID: 31985 Comm: kworker/3:1 Kdump: loaded Not tainted 5.3.18-150300.59.90-default \#1 SLE15-SP3
\[2158499.700096\] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020
\[2158499.700351\] Workqueue: cifsiod cifs\_resolve\_server \[cifs\]
\[2158499.700380\] RIP: 0010:assoc\_array\_insert+0x85f/0xa40
\[2158499.700401\] Code: ff 74 2b 48 8b 3b 49 8b 45 18 4c 89 e6 48 83 e7 fe e8 95 ec 74 00 3b 45 88 7d db 85 c0 79 d4 0f 0b 0f 0b 0f 0b e8 41 f2 be ff \<0f\> 0b 0f 0b 81 7d 88 ff ff ff 7f 4c 89 eb 4c 8b ad 58 ff ff ff 0f
\[2158499.700448\] RSP: 0018:ffffc0bd6187faf0 EFLAGS: 00010282
\[2158499.700470\] RAX: ffff9f1ea7da2fe8 RBX: ffff9f1ea7da2fc1 RCX: 0000000000000005
\[2158499.700492\] RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000000
\[2158499.700515\] RBP: ffffc0bd6187fbb0 R08: ffff9f185faf1100 R09: 0000000000000000
\[2158499.700538\] R10: ffff9f1ea7da2cc0 R11: 000000005ed8cec8 R12: ffffc0bd6187fc28
\[2158499.700561\] R13: ffff9f15feb8d000 R14: ffff9f1ea7da2fc0 R15: ffff9f168dc0d740
\[2158499.700585\] FS:  0000000000000000(0000) GS:ffff9f185fac0000(0000) knlGS:0000000000000000
\[2158499.700610\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[2158499.700630\] CR2: 00007fdd94fca238 CR3: 0000000809d8c006 CR4: 00000000003706e0
\[2158499.700702\] Call Trace:
\[2158499.700741\]  ? key\_alloc+0x447/0x4b0
\[2158499.700768\]  ? \_\_key\_link\_begin+0x43/0xa0
\[2158499.700790\]  \_\_key\_link\_begin+0x43/0xa0
\[2158499.700814\]  request\_key\_and\_link+0x2c7/0x730
\[2158499.700847\]  ? dns\_resolver\_read+0x20/0x20 \[dns\_resolver\]
\[2158499.700873\]  ? key\_default\_cmp+0x20/0x20
\[2158499.700898\]  request\_key\_tag+0x43/0xa0
\[2158499.700926\]  dns\_query+0x114/0x2ca \[dns\_resolver\]
\[2158499.701127\]  dns\_resolve\_server\_name\_to\_ip+0x194/0x310 \[cifs\]
\[2158499.701164\]  ? scnprintf+0x49/0x90
\[2158499.701190\]  ? \_\_switch\_to\_asm+0x40/0x70
\[2158499.701211\]  ? \_\_switch\_to\_asm+0x34/0x70
\[2158499.701405\]  reconn\_set\_ipaddr\_from\_hostname+0x81/0x2a0 \[cifs\]
\[2158499.701603\]  cifs\_resolve\_server+0x4b/0xd0 \[cifs\]
\[2158499.701632\]  process\_one\_work+0x1f8/0x3e0
\[2158499.701658\]  worker\_thread+0x2d/0x3f0
\[2158499.701682\]  ? process\_one\_work+0x3e0/0x3e0
\[2158499.701703\]  kthread+0x10d/0x130
\[2158499.701723\]  ? kthread\_park+0xb0/0xb0
\[2158499.701746\]  ret\_from\_fork+0x1f/0x40

The situation occurs as follows:
\* Some kernel facility invokes dns\_query() to resolve a hostname, for
  example, "abcdef". The function registers its global DNS resolver
  cache as current-\>cred.thread\_keyring and passes the query to
  request\_key\_net() -\> request\_key\_tag() -\> request\_key\_and\_link().
\* Function request\_key\_and\_link() creates a keyring\_search\_context
  object. Its match\_data.cmp method gets set via a call to
  type-\>match\_preparse() (resolves to dns\_resolver\_match\_preparse()) to
  dns\_resolver\_cmp().
\* Function request\_key\_and\_link() continues and invokes
  search\_process\_keyrings\_rcu() which returns that a given key was not
  found. The control is then passed to request\_key\_and\_link() -\>
  construct\_alloc\_key().
\* Concurrently to that, a second task similarly makes a DNS query for
  "abcdef." and its result gets inserted into the DNS resolver cache.
\* Back on the first task, function construct\_alloc\_key() first runs
  \_\_key\_link\_begin() to determine an assoc\_array\_edit operation to
  insert a new key. Index keys in the array are compared exactly as-is,
  using keyring\_compare\_object(). The operation 
---truncated---

## Affected and fixed versions

- Linux: \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 65bd66a794bfa059375ec834885bb610d75c0182; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 0a6b0ca58685be34979236f83f2b322635b80b32; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 9aecfebea24fe6071ace5cc9fd6d690b87276bbb; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 00edfa6d4fe022942e2f2e6f3294ff13ef78b15c; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< e091bb55af9a930801f83df78195a908a76e1479; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< d55901522f96082a43b9842d34867363c0cdbac5 (cvelist)
- Linux: 5.3 (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-2023-54170. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-54170.md
Affected: Linux >= df593ee23e05cdda16c8c995e5818779431bb29f, < 65bd66a794bfa059375ec834885bb610d75c0182; >= df593ee23e05cdda16c8c995e5818779431bb29f, < 0a6b0ca58685be34979236f83f2b322635b80b32; >= df593ee23e05cdda16c8c995e5818779431bb29f, < 9aecfebea24fe6071ace5cc9fd6d690b87276bbb; >= df593ee23e05cdda16c8c99…
Fixed in: Linux 65bd66a794bfa059375ec834885bb610d75c0182, Linux 0a6b0ca58685be34979236f83f2b322635b80b32, Linux 9aecfebea24fe6071ace5cc9fd6d690b87276bbb, Linux 00edfa6d4fe022942e2f2e6f3294ff13ef78b15c

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-2023-54170 being exploited?

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

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2023-54170?

Linux \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 65bd66a794bfa059375ec834885bb610d75c0182; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 0a6b0ca58685be34979236f83f2b322635b80b32; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 9aecfebea24fe6071ace5cc9fd6d690b87276bbb; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< 00edfa6d4fe022942e2f2e6f3294ff13ef78b15c; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< e091bb55af9a930801f83df78195a908a76e1479; \>= df593ee23e05cdda16c8c995e5818779431bb29f, \< d55901522f96082a43b9842d34867363c0cdbac5; Linux 5.3.

### Is there a fix for CVE-2023-54170?

Yes. Fixed in Linux 65bd66a794bfa059375ec834885bb610d75c0182, Linux 0a6b0ca58685be34979236f83f2b322635b80b32, Linux 9aecfebea24fe6071ace5cc9fd6d690b87276bbb, Linux 00edfa6d4fe022942e2f2e6f3294ff13ef78b15c. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-54170?

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/65bd66a794bfa059375ec834885bb610d75c0182>
- other: <https://git.kernel.org/stable/c/0a6b0ca58685be34979236f83f2b322635b80b32>
- other: <https://git.kernel.org/stable/c/9aecfebea24fe6071ace5cc9fd6d690b87276bbb>
- other: <https://git.kernel.org/stable/c/00edfa6d4fe022942e2f2e6f3294ff13ef78b15c>
- other: <https://git.kernel.org/stable/c/e091bb55af9a930801f83df78195a908a76e1479>
- other: <https://git.kernel.org/stable/c/d55901522f96082a43b9842d34867363c0cdbac5>

## 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-2023-54170>

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