# CVE-2022-49807: nvmet: fix a memory leak in nvmet_auth_set_key

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 7% of CVEs (2026-12-01)
- Published: 2025-05-01T14:09:33.492Z
- Modified: 2026-11-05T20:17:13.067Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

nvmet: fix a memory leak in nvmet_auth_set_key

When changing dhchap secrets we need to release the old
secrets as well.

kmemleak complaint:
--
unreferenced object 0xffff8c7f44ed8180 (size 64):
  comm "check", pid 7304, jiffies 4295686133 (age 72034.246s)
  hex dump (first 32 bytes):
    44 48 48 43 2d 31 3a 30 30 3a 4c 64 4c 4f 64 71  DHHC-1:00:LdLOdq
    79 56 69 67 77 48 55 32 6d 5a 59 4c 7a 35 59 38  yVigwHU2mZYLz5Y8
  backtrace:
    [<00000000b6fc5071>] kstrdup+0x2e/0x60
    [<00000000f0f4633f>] 0xffffffffc0e07ee6
    [<0000000053006c05>] 0xffffffffc0dff783
    [<00000000419ae922>] configfs_write_iter+0xb1/0x120
    [<000000008183c424>] vfs_write+0x2be/0x3c0
    [<000000009005a2a5>] ksys_write+0x5f/0xe0
    [<00000000cd495c89>] do_syscall_64+0x38/0x90
    [<00000000f2a84ac5>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

(As written by CVE List.)

## Affected

- Linux Linux: from db1312dd95488b5e6ff362ff66fcf953a46b1821 before 65710ea51d4a185592c7b14c9e33d0c4a364f074; from db1312dd95488b5e6ff362ff66fcf953a46b1821 before 0a52566279b4ee65ecd2503d7b7342851f84755c; 6.0 (not affected: before 6.0; from 6.0.10 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 6.0 before 6.0.10; 6.1

## References

- <https://git.kernel.org/stable/c/65710ea51d4a185592c7b14c9e33d0c4a364f074> (patch)
- <https://git.kernel.org/stable/c/0a52566279b4ee65ecd2503d7b7342851f84755c> (patch)

## Sources

- CVE List: [CVE-2022-49807](https://www.cve.org/CVERecord?id=CVE-2022-49807), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2022-49807](https://nvd.nist.gov/vuln/detail/CVE-2022-49807), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2022-49807 · Whole record: https://cve.day/CVE-2022-49807.json · Rebuilt by cve.day 2026-11-25T22:58:20.880Z
