Description
In the Linux kernel, the following vulnerability has been resolved:
libfs: fix infinite directory reads for offset dir
After we switch tmpfs dir operations from simple_dir_operations to
simple_offset_dir_operations, every rename happened will fill new dentry
to dest dir's maple tree(&SHMEM_I(inode)->dir_offsets->mt) with a free
key starting with octx->newx_offset, and then set newx_offset equals to
free key + 1. This will lead to infinite readdir combine with rename
happened at the same time, which fail generic/736 in xfstests(detail show
as below).
1. create 5000 files(1 2 3...) under one dir
2. call readdir(man 3 readdir) once, and get one entry
3. rename(entry, "TEMPFILE"), then rename("TEMPFILE", entry)
4. loop 2~3, until readdir return nothing or we loop too many
times(tmpfs break test with the second condition)
We choose the same logic what commit 9b378f6ad48cf ("btrfs: fix infinite
directory reads") to fix it, record the last_index when we open dir, and
do not emit the entry which index >= last_index. The file->private_data
now used in offset dir can use directly to do this, and we also update
the last_index when we llseek the dir file.
[brauner: only update last_index after seek when offset is zero like Jan suggested]
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 6.6 | 6.10.7 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 6.10.7-1 | — |
| Debian 13 | linux | 6.10.7-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | linux | 6.8.0-50.51 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-aws | 6.8.0-1020.22 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-azure | 6.8.0-1020.23 | USN-7196-1 |
| Ubuntu 24.04 LTS | linux-gcp +1 | 6.8.0-1019.21 | USN-7155-1, USN-7154-1 |
| Ubuntu 24.04 LTS | linux-gke | 6.8.0-1015.19 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-gkeop | 6.8.0-1002.4 | USN-7156-1 |
| Ubuntu 24.04 LTS | linux-ibm | 6.8.0-1017.17 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-nvidia-lowlatency | 6.8.0-1019.21.1 | USN-7155-1 |
| Ubuntu 24.04 LTS | linux-oem-6.8 | 6.8.0-1018.18 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-oracle | 6.8.0-1017.18 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-raspi | 6.8.0-1016.18 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-riscv +1 | 6.8.0-50.51.1 | USN-7154-1 |
| Ubuntu 22.04 LTS | linux-aws-6.8 | 6.8.0-1020.22~22.04.1 | USN-7154-1 |
| Ubuntu 22.04 LTS | linux-azure-6.8 | 6.8.0-1020.23~22.04.1 | USN-7196-1 |
| Ubuntu 22.04 LTS | linux-gcp-6.8 +1 | 6.8.0-1019.21~22.04.1 | USN-7155-1, USN-7154-1 |
| Ubuntu 22.04 LTS | linux-hwe-6.8 | 6.8.0-50.51~22.04.1 | USN-7154-2 |
| Ubuntu 22.04 LTS | linux-oracle-6.8 | 6.8.0-1017.18~22.04.1 | USN-7154-1 |
| Ubuntu 22.04 LTS | linux-riscv +31 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv-6.8 +1 | 6.8.0-50.51.1~22.04.1 | USN-7154-1 |
| Ubuntu 20.04 LTS | linux-gke +26 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +13 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro Realtime 24.04 LTS | linux-raspi-realtime | 6.8.0-2015.16 | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime | 6.8.1-1013.14 | — |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | kernel | No fix yet | — |
Advisories 6
- USN-7154-1 linux, linux-aws, linux-aws-6.8, linux-gcp, linux-gcp-6.8, linux-gke, linux-ibm, linux-lowlatency, linux-lowlatency-hwe-6.8, linux-oem-6.8, linux-oracle, linux-oracle-6.8, linux-raspi vulnerabilities Ubuntu Security Notices (USN) · Oct 29, 2026
- USN-7155-1 linux-nvidia, linux-nvidia-6.8, linux-nvidia-lowlatency vulnerabilities Ubuntu Security Notices (USN) · Oct 29, 2026
- USN-7196-1 linux-azure, linux-azure-6.8 vulnerabilities Ubuntu Security Notices (USN) · Oct 29, 2026
- USN-7156-1 linux-gkeop vulnerabilities Ubuntu Security Notices (USN) · Oct 29, 2026
- USN-7154-2 linux-hwe-6.8 vulnerabilities Ubuntu Security Notices (USN) · Oct 29, 2026
- WID-SEC-2024-2133 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Feb 16, 2026