Public bug reported:

Environment:
• OS: Ubuntu 26.04 (64-bit)
• Kernel: 7.0.0-44-generic #44-Ubuntu SMP PREEMPT(lazy)
• Hardware: Gigabyte B550 GAMING X V2 (BIOS FE 03/22/2024), AMD Ryzen 7
• GPU: AMD Vega 20 / Radeon VII (0000:06:00.0, 60 active CUs)
• Workload: BOINC (Kessler@home OpenCL/ROCm GPU tasks running concurrently, 
~15–35s runtime per task)

Problem Description:
When running multiple short-lived ROCm/OpenCL compute tasks concurrently on a 
Vega 20 GPU, kfd_process_wq_release repeatedly stalls CPU workers (hogged CPU 
for >10000us), followed by a refcount_t: underflow; use-after-free in 
amdgpu_amdkfd_gpuvm_destroy_cb during delayed_fput. This subsequently leads to 
SLAB list corruption (list_del corruption) and eventually a fatal Oops: general 
protection fault in __mutex_lock.

Steps to Reproduce:
1. Boot Ubuntu with kernel 7.0.0-44-generic on a system with a Vega 20 GPU.
2. Run multiple concurrent short-lived OpenCL/ROCm compute jobs (e.g., 3–4 
concurrent BOINC Kessler@home GPU tasks that initialize and tear down KFD/GPUVM 
contexts every 15–35 seconds).
3. Monitor dmesg / journalctl -k. After a few hours, the refcount underflow 
occurs, followed later by heap corruption and a kernel Oops.

(Note: The kernel log shows Tainted: [S]=CPU_OUT_OF_SPEC due to BIOS
settings; however, the initial trigger is a deterministic refcount_t:
underflow inside amdgpu_amdkfd_gpuvm_destroy_cb during concurrent KFD
process teardown.)

Relevant Kernel Logs:
1. Initial refcount_t: underflow; use-after-free in 
amdgpu_amdkfd_gpuvm_destroy_cb:

Nov 29 07:22:13 ryzen7 kernel: workqueue: kfd_process_wq_release [amdgpu] 
hogged CPU for >10000us 5 times, consider switching to WQ_UNBOUND
Nov 29 07:34:06 ryzen7 kernel: amdgpu: init_user_pages: Failed to register MMU 
notifier: -4
Nov 29 07:57:48 ryzen7 kernel: workqueue: kfd_process_wq_release [amdgpu] 
hogged CPU for >10000us 7 times, consider switching to WQ_UNBOUND
Nov 29 08:49:19 ryzen7 kernel: ------------[ cut here ]------------
Nov 29 08:49:19 ryzen7 kernel: refcount_t: underflow; use-after-free.
Nov 29 08:49:19 ryzen7 kernel: WARNING: lib/refcount.c:28 at 
refcount_warn_saturate+0x68/0xb0, CPU#1: kworker/1:33/127089
Nov 29 08:49:19 ryzen7 kernel: CPU: 1 UID: 0 PID: 127089 Comm: kworker/1:33 
Tainted: G S                  7.0.0-44-generic #44-Ubuntu PREEMPT(lazy)
Nov 29 08:49:19 ryzen7 kernel: Hardware name: Gigabyte Technology Co., Ltd. 
B550 GAMING X V2/B550 GAMING X V2, BIOS FE 03/22/2024
Nov 29 08:49:19 ryzen7 kernel: Workqueue: events delayed_fput
Nov 29 08:49:19 ryzen7 kernel: RIP: 0010:refcount_warn_saturate+0x68/0xb0
Nov 29 08:49:19 ryzen7 kernel: RAX: ffff8a9f486bf280 RBX: ffff8a9f54a6e800 RCX: 
0000000000000000
Nov 29 08:49:19 ryzen7 kernel: RDX: 0000000000000000 RSI: 0000000000000003 RDI: 
ffffffffb22faa00
Nov 29 08:49:19 ryzen7 kernel: Call Trace:
Nov 29 08:49:19 ryzen7 kernel:  <TASK>
Nov 29 08:49:19 ryzen7 kernel:  amdgpu_amdkfd_gpuvm_destroy_cb+0x129/0x140 
[amdgpu]
Nov 29 08:49:19 ryzen7 kernel:  amdgpu_vm_fini+0x40/0x600 [amdgpu]
Nov 29 08:49:19 ryzen7 kernel:  ? amdgpu_vm_bo_del+0x2f8/0x390 [amdgpu]
Nov 29 08:49:19 ryzen7 kernel:  amdgpu_driver_postclose_kms+0x1ab/0x290 [amdgpu]
Nov 29 08:49:19 ryzen7 kernel:  drm_file_free+0x240/0x2d0
Nov 29 08:49:19 ryzen7 kernel:  drm_release+0xcb/0x160
Nov 29 08:49:19 ryzen7 kernel:  amdgpu_drm_release+0x5b/0xb0 [amdgpu]
Nov 29 08:49:19 ryzen7 kernel:  __fput+0xed/0x2d0
Nov 29 08:49:19 ryzen7 kernel:  delayed_fput+0x35/0x60
Nov 29 08:49:19 ryzen7 kernel:  process_one_work+0x1ac/0x3d0
Nov 29 08:49:19 ryzen7 kernel:  worker_thread+0x1b8/0x360
Nov 29 08:49:19 ryzen7 kernel: ---[ end trace 0000000000000000 ]---


2. Subsequent SLAB corruption on the freed object (ffff8a9f54a6e800):

Nov 29 09:31:33 ryzen7 kernel:  slab kmalloc-rnd-10-256 start ffff8a9f54a6e800 
pointer offset 32 size 256
Nov 29 09:31:33 ryzen7 kernel: ------------[ cut here ]------------
Nov 29 09:31:33 ryzen7 kernel: list_del corruption. prev->next should be 
ffff8a9f40881448, but was ffff8a9f49f62348. (prev=ffff8a9f54a6e820)


3. Fatal General Protection Fault later on the corrupted structure:

Nov 29 17:20:29 ryzen7 kernel: Oops: general protection fault, probably for 
non-canonical address 0xc000000000ebd15c: 0000 [#2] SMP NOPTI
Nov 29 17:20:29 ryzen7 kernel: CPU: 7 UID: 114 PID: 245779 Comm: 
kessler_1.11_x8 Tainted: G S    D W           7.0.0-44-generic #44-Ubuntu 
PREEMPT(lazy)
Nov 29 17:20:29 ryzen7 kernel: RIP: 0010:__mutex_lock.constprop.0+0x919/0xb10
Nov 29 17:20:29 ryzen7 kernel: RAX: c000000000c60ac8 RBX: ffff8a9f54a6e840 RCX: 
ffff8a9f54a6e840

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: linux-image-7.0.0-44-generic 7.0.0-44.44
ProcVersionSignature: Ubuntu 7.0.0-44.44-generic 7.0.14
Uname: Linux 7.0.0-44-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version k7.0.0-44-generic.
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/controlC1', 
'/dev/snd/hwC1D0', '/dev/snd/pcmC1D2c', '/dev/snd/pcmC1D0c', 
'/dev/snd/pcmC1D0p', '/dev/snd/by-path', '/dev/snd/controlC0', 
'/dev/snd/hwC0D0', '/dev/snd/pcmC0D11p', '/dev/snd/pcmC0D10p', 
'/dev/snd/pcmC0D9p', '/dev/snd/pcmC0D8p', '/dev/snd/pcmC0D7p', 
'/dev/snd/pcmC0D3p', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
Card0.Amixer.info: Error: [Errno 2] No such file or directory: 'amixer'
Card0.Amixer.values: Error: [Errno 2] No such file or directory: 'amixer'
Card1.Amixer.info: Error: [Errno 2] No such file or directory: 'amixer'
Card1.Amixer.values: Error: [Errno 2] No such file or directory: 'amixer'
CasperMD5CheckResult: pass
CloudArchitecture: x86_64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
CurrentDmesg: Error: command ['dmesg'] failed with exit code 1: dmesg: read 
kernel buffer failed: Operation not permitted
Date: Sun Nov 29 20:33:00 2026
InstallationDate: Installed on 2024-05-10 (933 days ago)
InstallationMedia: Ubuntu-Server 22.04 LTS "Jammy Jellyfish" - Release amd64 
(20220421)
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 002: ID 048d:5702 Integrated Technology Express, Inc. RGB LED 
Controller
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Lsusb-t:
 /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 480M
     |__ Port 003: Dev 002, If 0, Class=Human Interface Device, Driver=usbhid, 
12M
 /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
 /:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
 /:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
MachineType: Gigabyte Technology Co., Ltd. B550 GAMING X V2
ProcEnviron:
 LANG=de_DE.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm
 XDG_RUNTIME_DIR=<set>
ProcFB:
 
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-7.0.0-44-generic 
root=UUID=d7f90c7b-808f-41f0-afac-bda310bf9b07 ro pcie_aspm=off amdgpu.runpm=0 
amdgpu.baco=0 amdgpu.ppfeaturemask=0xffffffff 
crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: linux
UpgradeStatus: Upgraded to resolute on 2026-11-10 (19 days ago)
acpidump:
 
dmi.bios.date: 03/22/2024
dmi.bios.release: 5.17
dmi.bios.vendor: American Megatrends International, LLC.
dmi.bios.version: FE
dmi.board.asset.tag: Default string
dmi.board.name: B550 GAMING X V2
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: 
dmi:bvnAmericanMegatrendsInternational,LLC.:bvrFE:bd03/22/2024:br5.17:svnGigabyteTechnologyCo.,Ltd.:pnB550GAMINGXV2:pvr-CF:rvnGigabyteTechnologyCo.,Ltd.:rnB550GAMINGXV2:rvrx.x:cvnDefaultstring:ct3:cvrDefaultstring:skuDefaultstring:pfaB550MB:
dmi.product.family: B550 MB
dmi.product.name: B550 GAMING X V2
dmi.product.sku: Default string
dmi.product.version: -CF
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2178383

Title:
  amdgpu/amdkfd: refcount_t underflow / use-after-free in
  amdgpu_amdkfd_gpuvm_destroy_cb on Vega 20 (Kernel 7.0.0-44-generic)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2178383/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to