The Linux kernel recently resolved a vulnerability related to the Direct Rendering Module (drm/amdkfd) subsystem. This specific issue involves the migration DMA map direction, which should be set the same as the DMA unmap setting to avoid causing warnings in the DMA core.

An in-depth discussion on this issue can be found at the following link on the kernel mailing list: https://lore.kernel.org/all/04d4ab32-45a1-4b88-86ee-fbf35aca40@amd.com/T/

There isn't a significant impact on performance, but to simplify the process and align the DMA direction setting, the DMA map direction was set as BIDIRECTIONAL.

[ 150.834218] WARNING: CPU: 8 PID: 1812 at kernel/dma/debug.c:1028 check_unmap+x1cc/x930
[ 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
---truncated---

This particular warning was triggered under certain conditions that have now been resolved.

If you are running a Linux kernel version with this bug, you should consider upgrading to a kernel version that has this fix implemented to avoid encountering any issues.

The full patch can be found in the Linux kernel repository for your reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cdb993cd4ae3a95e2588475553cac4ce243f986f

In conclusion, CVE-2024-57897 refers to a vulnerability in the Linux kernel's drm/amdkfd subsystem which has been successfully resolved. Users are advised to upgrade their kernel version as needed to avoid any issues related to this vulnerability. This post provided details about the code snippet, links to original references, and exploit details using simple American English for better understanding.

Timeline

Published on: 01/15/2025 13:15:14 UTC
Last modified on: 01/20/2025 06:29:07 UTC