| The CVE-2021-47178 is a bug in the Linux kernel that was introduced in version 5.11 and fixed in versions 5.12.9 and 5.13. The issue occurs in the `target_core_transport.c` file, which is part of the Target Core Module (TCM) subsystem. The TCM provides a generic framework for implementing SCSI target devices. |
| |
| The bug is caused by the use of `smp_processor_id()` in preemptible code, specifically in the `__target_init_cmd()` function. This function is called from various places, including the `tcm_loop_queuecommand()` and `scsi_queue_rq()` functions. The use of `smp_processor_id()` in preemptible code can lead to incorrect behavior and potential crashes. |
| |
| The bug was reported with a kernel crash dump, which showed that the system was running with the `fio` command when the crash occurred. The crash dump also revealed that the system was using a specific BIOS version (1302) on a PRIME Z270-A motherboard. The Linux kernel CVE team has recommended updating to the latest stable kernel version to fix this issue, and provided links to the individual commits that resolve the problem. |
| |
| In terms of affected versions, the issue was introduced in 5.11 with commit `1526d9f10c61` and fixed in 5.12.9 with commit `a20b6eaf4f35` and in 5.13 with commit `70ca3c57ff91`. Unaffected versions may change over time as fixes are backported to older supported kernel versions. |
| |