# CVE-2024-57897: drm/amdkfd: Correct the migration DMA map direction

> 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.30% (percentile 15, 2026-11-26)
- **Published:** 2025-01-15T13:05:49.033Z
- **Modified:** 2026-06-17T08:14:10.410Z

## Who should check

- Anyone running Linux \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< 22d36ad92e5703e2e9bdf228990c0999d5d53ea3; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< 465b18e1c518e799593797d4603f4ab76de4e1d8; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< d0fafe701c6aca785cc8685f9f76fdc73e662f47; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< de39f72953953ca7a2630f9b80ccdfef40568746; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< 5c3de6b02d38eb9386edf50490e050bb44398e40
- Anyone running Linux 3.19

## Description

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

drm/amdkfd: Correct the migration DMA map direction

The SVM DMA device map direction should be set the same as
the DMA unmap setting, otherwise the DMA core will report
the following warning.

Before finialize this solution, there're some discussion on
the DMA mapping type(stream-based or coherent) in this KFD
migration case, followed by https://lore.kernel.org/all/04d4ab32
-45a1-4b88-86ee-fb0f35a0ca40@amd.com/T/.

As there's no dma\_sync\_single\_for\_\*() in the DMA buffer accessed
that because this migration operation should be sync properly and
automatically. Give that there's might not be a performance problem
in various cache sync policy of DMA sync. Therefore, in order to
simplify the DMA direction setting alignment, let's set the DMA map
direction as BIDIRECTIONAL.

\[  150.834218\] WARNING: CPU: 8 PID: 1812 at kernel/dma/debug.c:1028 check\_unmap+0x1cc/0x930
\[  150.834225\] Modules linked in: amdgpu(OE) amdxcp drm\_exec(OE) gpu\_sched drm\_buddy(OE) drm\_ttm\_helper(OE) ttm(OE) drm\_suballoc\_helper(OE) drm\_display\_helper(OE) drm\_kms\_helper(OE) i2c\_algo\_bit rpcsec\_gss\_krb5 auth\_rpcgss nfsv4 nfs lockd grace netfs xt\_conntrack xt\_MASQUERADE nf\_conntrack\_netlink xfrm\_user xfrm\_algo iptable\_nat xt\_addrtype iptable\_filter br\_netfilter nvme\_fabrics overlay nfnetlink\_cttimeout nfnetlink openvswitch nsh nf\_conncount nf\_nat nf\_conntrack nf\_defrag\_ipv6 nf\_defrag\_ipv4 libcrc32c bridge stp llc sch\_fq\_codel intel\_rapl\_msr amd\_atl intel\_rapl\_common snd\_hda\_codec\_realtek snd\_hda\_codec\_generic snd\_hda\_scodec\_component snd\_hda\_codec\_hdmi snd\_hda\_intel snd\_intel\_dspcfg edac\_mce\_amd snd\_pci\_acp6x snd\_hda\_codec snd\_acp\_config snd\_hda\_core snd\_hwdep snd\_soc\_acpi kvm\_amd sunrpc snd\_pcm kvm binfmt\_misc snd\_seq\_midi crct10dif\_pclmul snd\_seq\_midi\_event ghash\_clmulni\_intel sha512\_ssse3 snd\_rawmidi nls\_iso8859\_1 sha256\_ssse3 sha1\_ssse3 snd\_seq aesni\_intel snd\_seq\_device crypto\_simd snd\_timer cryptd input\_leds
\[  150.834310\]  wmi\_bmof serio\_raw k10temp rapl snd sp5100\_tco ipmi\_devintf soundcore ccp ipmi\_msghandler cm32181 industrialio mac\_hid msr parport\_pc ppdev lp parport efi\_pstore drm(OE) ip\_tables x\_tables pci\_stub crc32\_pclmul nvme ahci libahci i2c\_piix4 r8169 nvme\_core i2c\_designware\_pci realtek i2c\_ccgx\_ucsi video wmi hid\_generic cdc\_ether usbnet usbhid hid r8152 mii
\[  150.834354\] CPU: 8 PID: 1812 Comm: rocrtst64 Tainted: G           OE      6.10.0-custom \#492
\[  150.834358\] Hardware name: AMD Majolica-RN/Majolica-RN, BIOS RMJ1009A 06/13/2021
\[  150.834360\] RIP: 0010:check\_unmap+0x1cc/0x930
\[  150.834363\] Code: c0 4c 89 4d c8 e8 34 bf 86 00 4c 8b 4d c8 4c 8b 45 c0 48 8b 4d b8 48 89 c6 41 57 4c 89 ea 48 c7 c7 80 49 b4 84 e8 b4 81 f3 ff \<0f\> 0b 48 c7 c7 04 83 ac 84 e8 76 ba fc ff 41 8b 76 4c 49 8d 7e 50
\[  150.834365\] RSP: 0018:ffffaac5023739e0 EFLAGS: 00010086
\[  150.834368\] RAX: 0000000000000000 RBX: ffffffff8566a2e0 RCX: 0000000000000027
\[  150.834370\] RDX: ffff8f6a8f621688 RSI: 0000000000000001 RDI: ffff8f6a8f621680
\[  150.834372\] RBP: ffffaac502373a30 R08: 00000000000000c9 R09: ffffaac502373850
\[  150.834373\] R10: ffffaac502373848 R11: ffffffff84f46328 R12: ffffaac502373a40
\[  150.834375\] R13: ffff8f6741045330 R14: ffff8f6741a77700 R15: ffffffff84ac831b
\[  150.834377\] FS:  00007faf0fc94c00(0000) GS:ffff8f6a8f600000(0000) knlGS:0000000000000000
\[  150.834379\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[  150.834381\] CR2: 00007faf0b600020 CR3: 000000010a52e000 CR4: 0000000000350ef0
\[  150.834383\] Call Trace:
\[  150.834385\]  \<TASK\>
\[  150.834387\]  ? show\_regs+0x6d/0x80
\[  150.834393\]  ? \_\_warn+0x8c/0x140
\[  150.834397\]  ? check\_unmap+0x1cc/0x930
\[  150.834400\]  ? report\_bug+0x193/0x1a0
\[  150.834406\]  ? handle\_bug+0x46/0x80
\[  150.834410\]  ? exc\_invalid\_op+0x1d/0x80
\[  150.834413\]  ? asm\_exc\_invalid\_op+0x1f/0x30
\[  150.834420\]  ? check\_unmap+0x1cc/0x930
\[  150.834425\]  debug\_dma\_unmap\_page+0x86/0x90
\[  150.834431\]  ? srso\_return\_thunk+0x5/0x5f
\[  150.834435\] 
---truncated---

## Affected and fixed versions

- Linux: \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< 22d36ad92e5703e2e9bdf228990c0999d5d53ea3; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< 465b18e1c518e799593797d4603f4ab76de4e1d8; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< d0fafe701c6aca785cc8685f9f76fdc73e662f47; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< de39f72953953ca7a2630f9b80ccdfef40568746; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< 5c3de6b02d38eb9386edf50490e050bb44398e40 (cvelist)
- Linux: 3.19 (cvelist)

## Mitigation

- Upgrade Linux to 5c3de6b02d38eb9386edf50490e050bb44398e40 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-57897. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-57897.md
Affected: Linux >= 4a488a7ad71401169cecee75dc94bcce642e2c53, < 22d36ad92e5703e2e9bdf228990c0999d5d53ea3; >= 4a488a7ad71401169cecee75dc94bcce642e2c53, < 465b18e1c518e799593797d4603f4ab76de4e1d8; >= 4a488a7ad71401169cecee75dc94bcce642e2c53, < d0fafe701c6aca785cc8685f9f76fdc73e662f47; >= 4a488a7ad71401169cecee7…
Fixed in: Linux 22d36ad92e5703e2e9bdf228990c0999d5d53ea3, Linux 465b18e1c518e799593797d4603f4ab76de4e1d8, Linux 5c3de6b02d38eb9386edf50490e050bb44398e40

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-2024-57897 being exploited?

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

### How serious is CVE-2024-57897?

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

### Which versions are affected by CVE-2024-57897?

Linux \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< 22d36ad92e5703e2e9bdf228990c0999d5d53ea3; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< 465b18e1c518e799593797d4603f4ab76de4e1d8; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< d0fafe701c6aca785cc8685f9f76fdc73e662f47; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< de39f72953953ca7a2630f9b80ccdfef40568746; \>= 4a488a7ad71401169cecee75dc94bcce642e2c53, \< 5c3de6b02d38eb9386edf50490e050bb44398e40; Linux 3.19.

### Is there a fix for CVE-2024-57897?

Yes. Fixed in Linux 22d36ad92e5703e2e9bdf228990c0999d5d53ea3, Linux 465b18e1c518e799593797d4603f4ab76de4e1d8, Linux 5c3de6b02d38eb9386edf50490e050bb44398e40. Upgrade Linux to 5c3de6b02d38eb9386edf50490e050bb44398e40 or later.

### How do I check if I'm affected by CVE-2024-57897?

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/22d36ad92e5703e2e9bdf228990c0999d5d53ea3>
- patch: <https://git.kernel.org/stable/c/465b18e1c518e799593797d4603f4ab76de4e1d8>
- patch: <https://git.kernel.org/stable/c/d0fafe701c6aca785cc8685f9f76fdc73e662f47>
- patch: <https://git.kernel.org/stable/c/de39f72953953ca7a2630f9b80ccdfef40568746>
- patch: <https://git.kernel.org/stable/c/5c3de6b02d38eb9386edf50490e050bb44398e40>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html>

## 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-2024-57897>

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