Vulnerability · Published May 21, 2024 · Assigned by Linux
CVE-2021-47338fbmem: Do not delete the mode that is still in use
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 19% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: fbmem: Do not delete the mode that is still in use The execution of fb_delete_videomode() is not based on the result of the previous fbcon_mode_deleted(). As a result, the mode is directly deleted, regardless of whether it is still in use, which may cause UAF. ================================================================== BUG: KASAN: use-after-free in fb_mode_is_equal+0x36e/0x5e0 \ drivers/video/fbdev/core/modedb.c:924 Read of size 4 at addr ffff88807e0ddb1c by task syz-executor.0/18962 CPU: 2 PID: 18962 Comm: syz-executor.0 Not tainted 5.10.45-rc1+ #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ... Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x137/0x1be lib/dump_stack.c:118 print_address_description+0x6c/0x640 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report+0x13d/0x1e0 mm/kasan/report.c:562 fb_mode_is_equal+0x36e/0x5e0 drivers/video/fbdev/core/modedb.c:924 fbcon_mode_deleted+0x16a/0x220 drivers/video/fbdev/core/fbcon.c:2746 fb_set_var+0x1e1/0xdb0 drivers/video/fbdev/core/fbmem.c:975 do_fb_ioctl+0x4d9/0x6e0 drivers/video/fbdev/core/fbmem.c:1108 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 18960: kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:56 kasan_set_free_info+0x17/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x108/0x140 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1541 [inline] slab_free_freelist_hook+0xd6/0x1a0 mm/slub.c:1574 slab_free mm/slub.c:3139 [inline] kfree+0xca/0x3d0 mm/slub.c:4121 fb_delete_videomode+0x56a/0x820 drivers/video/fbdev/core/modedb.c:1104 fb_set_var+0x1f3/0xdb0 drivers/video/fbdev/core/fbmem.c:978 do_fb_ioctl+0x4d9/0x6e0 drivers/video/fbdev/core/fbmem.c:1108 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | bpftool | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-abi-stablelists | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-core | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-cross-headers | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-debug | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-debug-core | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-debug-devel | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-debug-modules | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-debug-modules-extra | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-devel | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-doc | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-headers | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-modules | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-modules-extra | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-rt | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-core | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug-core | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug-devel | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug-kvm | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug-modules | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug-modules-extra | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-devel | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-kvm | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-modules | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-modules-extra | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-tools | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-tools-libs | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-tools-libs-devel | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-zfcpdump | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-zfcpdump-core | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-zfcpdump-devel | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-zfcpdump-modules | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-zfcpdump-modules-extra | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | perf | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | python3-perf | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| Debian:12 | linux | 5.14.6-1 | DEBIAN-CVE-2021-47338 |
| Debian:13 | linux | 5.14.6-1 | DEBIAN-CVE-2021-47338 |
| Debian:14 | linux | 5.14.6-1 | DEBIAN-CVE-2021-47338 |
| Rocky Linux:8 | kernel | 0:4.18.0-553.22.1.el8_10 | RLSA-2024:7000 |
| Rocky Linux:8 | kernel-rt | 0:4.18.0-553.22.1.rt7.363.el8_10 | RLSA-2024:7001 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2021-47338 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2021-47338 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 13ff178ccd6d3b8074c542a911300b79c4eec255 – before 359311b85ebec7c07c3a08ae2f3def946cad33fa13ff178ccd6d3b8074c542a911300b79c4eec255 – before 087bff9acd2ec6db3f61aceb3224bde90fe0f7f813ff178ccd6d3b8074c542a911300b79c4eec255 – before f193509afc7ff37a46862610c93b896044d5b69313ff178ccd6d3b8074c542a911300b79c4eec255 – before d6e76469157d8f240e5dec6f8411aa8d306b112613ff178ccd6d3b8074c542a911300b79c4eec255 – before 0af778269a522c988ef0b4188556aba97fb420cc |
| Linux | Linux | 5.3 |
References
- https://git.kernel.org/stable/c/359311b85ebec7c07c3a08ae2f3def946cad33fa
- https://git.kernel.org/stable/c/087bff9acd2ec6db3f61aceb3224bde90fe0f7f8
- https://git.kernel.org/stable/c/f193509afc7ff37a46862610c93b896044d5b693
- https://git.kernel.org/stable/c/d6e76469157d8f240e5dec6f8411aa8d306b1126
- https://git.kernel.org/stable/c/0af778269a522c988ef0b4188556aba97fb420cc