CVE-2023-54008 in Linux
Resumen
por VulDB • 2026-06-29
Based on the kernel log snippet provided, here is an analysis of the crash and potential causes/solutions.
### **Summary** The system crashed with a **General Protection Fault (Invalid Opcode)** in the function `group_cpus_evenly`, which was called during the initialization of a virtio network device (`virtnet_probe`). This typically indicates a bug in CPU topology handling or affinity mask calculation within the kernel, often triggered by specific hardware configurations or virtualization setups.
---
### **Detailed Analysis**
#### 1. **Crash Location & Type** - **Function:** `group_cpus_evenly+0x1aa/0x1c0` (inlined/called from `create_affinity_masks`) - **Context:** Called during virtio device probe (`virtio_vdpa_find_vqs` → `virtnet_probe`). - **Exception:** `asm_exc_invalid_op` suggests an illegal instruction or a general protection fault triggered by invalid CPU state/mask manipulation.
#### 2. **Call Trace Breakdown** ```plaintext group_cpus_evenly+0x1aa/0x1c0 ← Core issue: CPU grouping logic failed create_affinity_masks+0xaf/0x1a0 ← Called to create IRQ affinity masks for virtqueues virtio_vdpa_find_vqs+0x83/0x1d0 ← VDPA (Virtual Data Path Acceleration) path finding vqs virtnet_probe+0x501/0xcd0 ← Network driver probe virtio_dev_probe+0x1af/0x260 ← Generic virtio device probing really_probe ← Kernel core probe mechanism ```
#### 3. **Key Observations** - **VDPA Path:** The crash occurs in the `vdpa` (Virtual Data Path Acceleration) path, not just standard virtio-net. This suggests you might be using a VDPA-based network backend or a specific virtualization setup that leverages hardware offloading via vdpa. - **CPU Affinity Logic:** `group_cpus_evenly` is responsible for distributing CPUs evenly across NUMA nodes when creating interrupt affinity masks. A crash here often points to: - Invalid CPU topology (e.g., hotplugged CPUs, inconsistent online maps). - Kernel bug in recent versions where the logic doesn’t handle certain edge cases (like isolated CPUs or specific SMT configurations).
---
### **Possible Causes**
1. **Kernel Bug in `group_cpus_evenly`**: - This function has had bugs in past kernel releases related to handling empty CPU masks, invalid NUMA nodes, or race conditions during hotplug. - Check if you are running a recent kernel (e.g., 5.x/6.x) where this bug might be known.
2. **Virtualization/Hardware Configuration**: - If using KVM/QEMU with VDPA devices, ensure the host CPU topology is correctly exposed to the guest. - Misconfigured SMT (Simultaneous Multithreading) or NUMA settings can trigger this.
3. **IRQ Affinity Mask Corruption**: - The `create_affinity_masks` function may be receiving invalid input due to prior driver initialization issues.
---
### **Recommended Solutions**
#### ✅ 1. **Update Kernel** - This issue has been fixed in several kernel versions. Check if your distribution provides a newer kernel version. - Look for commits related to `group_cpus_evenly` or `create_affinity_masks`. For example: - Commit fixing CPU mask handling in virtio/vdpa paths.
#### ✅ 2. **Disable VDPA (If Not Needed)** - If you don’t need hardware offloading via VDPA, disable it temporarily to see if the system stabilizes: ```bash # Blacklist vdpa modules or remove them from initramfs echo "blacklist vhost_vdpa" >> /etc/modprobe.d/blacklist.conf update-initramfs -u # Debian/Ubuntu dracut --force # RHEL/CentOS/Fedora ```
#### ✅ 3. **Adjust CPU Affinity Settings** - Try disabling automatic IRQ affinity balancing for virtio devices: ```bash echo "0" > /sys/bus/virtio/drivers/virtio_net/enable_affinity # Or globally via kernel parameter: # Add 'irqaffinity=none' or 'nohz_full=' to GRUB_CMDLINE_LINUX if applicable. ```
#### ✅ 4. **Check CPU Topology** - Ensure the host’s CPU topology is consistent: ```bash lscpu | grep -E "Socket|Core|Thread|NUMA" cat /sys/devices/system/cpu/online ```
VulDB is the best source for vulnerability data and more expert information about this specific topic.