총 15,720건
CVE-2026-98984
2026년 10월 23일In the Linux kernel, the following vulnerability has been resolved: dcache: don't put a mountpoint on a dentry that's being removed rmdir(), unlink() and rename() call dont_mount() on the victim and then detach_mounts() with the victim's inode locked. do_lock_mount() takes the inode lock of the mountpoint and checks cant_mount() so a mount can't show up after detach_mounts(). But attach_recursive_mnt() makes a second mountpoint for the root of the source mount so that the mounts already located at the destination can be put on top of it. No inode is locked for that one and d_set_mounted() only refuses a dentry that is unlinked. Between detach_mounts() and d_delete() the victim is still hashed: rmrace: b passed dont_mount() and detach_mounts(), sleeping T2: move_mount(S, /tmp/plcant/x, BENEATH) = 0 errno 0 () T1: rmdir(/tmp/plcant/d/b) = 0 errno 0 109 107 0:61 /d/b//deleted /tmp/plcant/x rw,relatime - tmpfs tmpfs rw 108 109 0:63 / /tmp/plcant/x rw,relatime - tmpfs T rw A bind mount of the directory that's being removed is moved beneath an existing mount while the rmdir() is located between the two calls. The mount ends up on the removed directory and nothing will ever detach it. Check cant_mount() in d_set_mounted() as well. dont_mount() raises the flag under d_lock before detach_mounts() runs so either the mountpoint is set first and detach_mounts() finds the mount or the flag is seen and the mount is refused.
CVE-2026-98983
2026년 10월 23일In the Linux kernel, the following vulnerability has been resolved: unshare: don't drop active namespace references that were never taken Active references on the namespaces of an nsproxy are taken when the nsproxy is installed into a task in switch_task_namespaces() and copy_namespaces() and dropped again by put_nsproxy() through deactivate_nsproxy(). But ksys_unshare() calls put_nsproxy() on an nsproxy that was never installed when set_cred_ucounts() fails. The new namespaces of that nsproxy go from zero to minus one and the namespaces shared with the caller lose a reference that belongs to the nsproxy the caller keeps using: WARNING: kernel/nscommon.c:171 at __ns_ref_active_put+0x1cd/0x230 nsproxy_ns_active_put deactivate_nsproxy ksys_unshare Afterwards the namespaces the caller lives in aren't listed by listns() anymore. set_cred_ucounts() only fails when alloc_ucounts() can't allocate and it only allocates when the real uid of the caller differs from its effective uid. Commit cefd55bd2159 ("nsproxy: fix free_nsproxy() and simplify create_new_namespaces()") separated the two cases on purpose. nsproxy_free() frees an nsproxy that was prepared but never installed and that's what a failed setns() uses in put_nsset(). Export it and use it for a failed unshare() as well.
CVE-2026-98982
2026년 10월 23일Linux 커널에서 다음 취약점이 해결되었다: namespace: 의사 dentry가 마운트의 루트가 되지 않도록 함 d_alloc_pseudo()는 파이프, 소켓 및 다른 파일들에 대한 dentry를 할당하는데, 이들은 절대 부모나 자식이 아니다. 이들은 DCACHE_NORCU를 가지고 있으며 dentry_free()가 즉시 해제한다. 이는 잠금 없는 경로 탐색이 이들을 절대 접근할 수 없기 때문이다. 이러한 dentry가 마운트의 루트가 아닌 한 이 규칙은 유지된다. 그러나 /proc/self/fd/<fd>를 해당 파일에 바인드 마운트하면 정확히 그 상황이 발생한다. alloc_file_pseudo()의 대부분 호출자는 파일을 커널 내부 마운트에 두며 may_copy_tree()는 이를 거부한다. 그러나 bpf_token_create()는 그렇지 않다. 이 함수는 토큰 파일을 호출자가 제공한 bpffs 마운트에 두며, 그 마운트는 호출자의 마운트 네임스페이스에 있으므로 클론이 다음과 같이 진행된다: mount --bind /proc/self/fd/<token> <file> open_tree(tokfd, "", AT_EMPTY_PATH | OPEN_TREE_CLONE) + move_mount() __follow_mount_rcu()는 해당 마운트의 ->mnt_root를 로드하고 dentry의 d_seq와 d_flags를 읽은 후에야 mount_lock을 확인한다. 그때쯤이면 dentry가 사라졌을 수 있다. 언마운트된 부모의 최종 mntput()은 mount_lock 하에서만 연결된 자식을 분리한다. 자식의 홀더가 바로 그 후 최종 put을 수행하면 루트가 dput()되고 즉시 해제되지만, 마운트 해시를 찾은 탐색자는 여전히 이를 참조한다. DCACHE_NORCU dentry를 루트로 하는 마운트 클론을 거부한다. 어차피 bpf 토큰의 바인드 마운트로는 합리적인 작업을 할 수 없다.
CVE-2026-98981
2026년 10월 23일Linux 커널에서 다음 취약점이 해결되었다: namespace: 마운트 분리 전에 dentry의 해시를 해제함 unlink(), rmdir() 및 rename()은 파일 시스템에서 엔트리를 제거하고, inode가 잠긴 상태에서 detach_mounts()를 호출한 후 inode가 잠금 해제되면 d_delete()를 호출한다. 문제는 detach_mounts()와 d_delete() 사이에 dentry가 여전히 해시되어 있고 긍정적인 상태라는 점이다. 그러나 detach_mounts() 이후에는 더 이상 dentry를 보호하는 것이 없다. dcache에서 이 dentry를 찾는 조회는 마운트가 숨긴 것을 드러낼 수 있다. 이는 다른 마운트 네임스페이스에서 마운트 포인트인 파일이나 디렉터리를 unlink할 때 문제가 된다. 기본 엔트리를 보호하던 모든 사용자는 d_delete()가 실행될 때까지 detach_mount() 호출과 경쟁할 수 있다. 경쟁 조건 창은 작지 않다. namespace_unlock()와 완전한 synchronize_rcu_expedited() 유예 기간, 그리고 엔트리의 inode_unlock()을 포함한다. 내 실험에서 세 명의 워커가 1분 내에 16140개의 unlink 중 11938개에서 오버마운트된 파일을 계속 읽으려 시도했다. 재미있는 사실로, d_invalidate()도 동일한 순서 문제를 가지고 있지만 올바르게 처리한다. 먼저 dentry의 해시를 해제하고 그 후에 마운트를 분리한다. __detach_mounts()에서도 동일하게 하자: - 아직 dentry를 찾지 못한 조회는 dcache에서 이를 놓치고 호출자가 보유한 디렉터리 잠금을 기다리며 이름이 완전히 사라질 때까지 대기한다. - 이미 찾은 락 없는 조회는 dentry가 여전히 마운트 포인트로 간주되는 동안 mount_lock 검사를 실패하고, 그렇지 않을 때 d_seq 검사를 실패하며 재시도한다. 이것은 락 없는 경로를 수정한다. 참조 카운트 조회는 후속 패치에서 수정해야 한다. 따라서 d_drop()으로 dentry를 처리한다. dentry는 여전히 긍정적이고 유지되지만 더 이상 찾을 수 없다. 그런 다음 분리 및 unlink를 진행한다. 재현 프로그램: 아래 프로그램으로 읽기 횟수를 계산했다. 4 CPU가 있는 VM에서 60초 동안 세 명의 워커가 실행되었다. 경쟁 조건 창은 여기 붙여진 디버그 패치로 확장되었다. fs.detach_race_walk_us는 mountpoint dentry를 찾고 마운트를 넘기기 전에 lookup_fast()에서 잠든다. fs.detach_race_unlink_us는 detach_mounts()와 d_delete() 사이의 vfs_unlink()에서 잠든다. // SPDX-License-Identifier: GPL-2.0 /* * unlink_covered: 마운트 복사본에서 마운트 포인트인 파일을 unlink하며, * 해당 복사본을 통해 파일을 여는 조회와 경쟁한다. * * A는 파일 f1(내용 SECRET_F)과 일반 파일 MARK_A가 있는 tmpfs이다. * A'는 MARK_A가 A'/f1에 바인딩된 A의 open_tree(OPEN_TREE_CLONE) 복사본이며, * 트리 fd가 닫힌 후 O_PATH fd를 통해 유지된다. 워커들은 이 fd를 통해 f1을 연다. * 드라이버가 A/f1을 unlink하는 동안, 그곳에는 아무것도 마운트되어 있지 않다. * 워커는 MARK_A를 읽거나 ENOENT를 받을 수 있다. * SECRET_F를 읽으면 성공이다: 이름이 마운트가 사라진 후에 발견된 것이다. * 락 없는 워크는 openat2(RESOLVE_CACHED)를 사용한다. * * 사용법: unlink_covered [-t 초] [-w 워커 수] */ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include <errno.h> #include <fcntl.h> #include <pthread.h> #include <stdatomic.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/mount.h> #include <sys/stat.h> #include <sys/syscall.h> #include <linux/openat2.h> #ifndef __NR_open_tree #define __NR_open_tree 428 #endif #ifndef __NR_move_mount #define __NR_move_mount 429 #endif #ifndef __NR_openat2 #define __NR_openat2 437 #endif #ifndef OPEN_TREE_CLONE #define OPEN_TREE_CLONE 1 #endif #ifndef OPEN_TREE_CLOEXEC #define OPEN_TREE_CLOEXEC O_CLOEXEC #endif #ifndef MOVE_MOUNT_F_EMPTY_PATH #define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 #endif #define WORK "/tmp/uc" #define ADIR WORK "/A" static int duration = 60, nwalkers = 3; static atomic_int stop, writer_waiting; static pthread_rwlock_t cur_lock = PTHREAD_RWLOCK_INITIALIZER; static int cur_fd = -1; /* A'의 루트, -1은 초기값 */
CVE-2026-98980
2026년 10월 23일Linux 커널에서 다음 취약점이 해결되었다: namei: refwalk에서 오버마운트된 항목을 노출하지 않음 rcuwalk에서는 dentry가 수락되기 전에 검증된다. step_into() step_into()는 d_seq를 재검사하고 __follow_mount_rcu()는 mount_lock을 재검사한다. 중간에 unlink된 항목은 조회를 재시도하게 하여 누락을 발생시킨다. refwalk는 이를 수행하지 않는다. lookup_fast()는 해시된 dentry에 대한 참조를 취하고 단순히 이를 수락한다. 따라서 참조가 취해진 후 발생한 unlink는 refwalk에서 감지되지 않는다. 이는 단순 파일에는 문제가 없다. unlink되기 전에 열었기 때문이다. 그러나 마운트포인트, 특히 잠긴 마운트포인트에는 매우 문제가 된다. unlink는 모든 마운트를 분리한 후 이름을 제거한다. 아직 마운트를 탐색하지 않은 refwalk는 기본 항목을 노출한다. 이는 매우 좁은 시간대지만 발생할 수 있다: 60초 동안 덮인 파일 읽기, 3명의 워커, 약 15000번의 unlink 확장 없음 27 해당 단계 + 200 us 3741 더 신뢰할 수 있는 재현기를 위해 첨부된 패치를 참조하라. 따라서 step_into() 이후에 항목을 확인한다. unlink(), rmdir(), rename()은 마운트를 분리하고 dentry를 제거하기 전에 dont_mount()로 dentry를 표시한다. 따라서 DCACHE_CANT_MOUNT로 표시되고 마운트가 조회될 때까지 해시되지 않은 dentry는 refwalk 중에 unlink된 이름이다. DCACHE_CANT_MOUNT는 마운트 조회 후 읽히며 detach_mounts()에 의해 분리되기 전에 설정된다. 마운트를 놓친 refwalk는 DCACHE_CANT_MOUNT를 본다. 일반 d_unlinked()는 괜찮다. rename은 dentry를 해시 체인에서 제거하지만 ___d_drop()은 d_hash.pprev를 유지한다. 따라서 __d_drop()과 rename만이 dentry를 해시 해제한다. IS_ROOT를 뒤집는 유일한 이동은 연결이 끊긴 별칭을 연결하는 것이다. 이는 DCACHE_CANT_MOUNT가 설정되지 않는다. step_into_slowpath()에 추가한다. ".."와 LOOKUP_DOWN은 합법적으로 해시되지 않은 디렉터리에 도달할 수 있다. 마운트를 넘어선 refwalk는 path.mnt가 nd->path.mnt와 다르다. 파일시스템이 자체적으로 제거한 dentry(d_invalidate(), d_drop())는 플래그가 설정되지 않으며 이전과 같이 처리된다. // SPDX-License-Identifier: GPL-2.0 /* * unlink_covered: 마운트포인트인 파일을 그 마운트의 분리된 복사본에서 unlink, * 그 복사본을 통해 파일을 여는 워커에 대응. * * A는 파일 f1(내용 SECRET_F)과 일반 파일 MARK_A를 가진 tmpfs이다. * A'는 A의 open_tree(OPEN_TREE_CLONE) 복사본으로 MARK_A가 A'/f1에 바인딩되어 있으며, * 트리 fd가 닫힌 후 루트의 O_PATH fd를 통해 유지된다. * 워커들은 드라이버가 A/f1을 unlink하는 동안 그 fd를 통해 f1을 연다. * A/f1에는 아무것도 마운트되어 있지 않다. 워커는 MARK_A를 읽거나 ENOENT를 받을 수 있다. * SECRET_F를 읽으면 성공이다: 이름이 마운트가 사라진 후 발견된 것이다. * 락 없는 탐색은 openat2(RESOLVE_CACHED)를 사용한다. * * 사용법: unlink_covered [-t 초] [-w 워커 수] */ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include <errno.h> #include <fcntl.h> #include <pthread.h> #include <stdatomic.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/mount.h> #include <sys/stat.h> #include <sys/syscall.h> #include <linux/openat2.h> #ifndef __NR_open_tree #define __NR_open_tree 428 #endif #ifndef __NR_move_mount #define __NR_move_mount 429 #endif #ifndef __NR_openat2 #define __NR_openat2 437 #endif #ifndef OPEN_TREE_CLONE #define OPEN_TREE_CLONE 1 #endif #ifndef OPEN_TREE_CLOEXEC #define OPEN_TREE_CLOEXEC O_CLOEXEC #endif #ifndef MOVE_MOUNT_F_EMPTY_PATH #define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 #endif #define WORK "/tmp/uc" #define ADIR WORK "/A" static int duration = 60, nwalkers = 3; static atomic_int stop, writer_waiting; static pthread_rwlock_t cur_lock = PTHREAD_RWLOCK_INITIALIZER; static int cur_fd = -1; /* A'의 루트, 없을 때 -1 */ static atomic_long n_unlink, n_walk, n_mark, n_enoent, n_othe ---생략---
CVE-2026-98979
2026년 10월 23일In the Linux kernel, the following vulnerability has been resolved: namespace: refuse an automount below a mount that is in no namespace It's possible to add autmounts even when the parent mount isn't in the mount namespace of the caller. The only requirement we have is that the parent mount namespace must not be NULL, i.e., unmounted. Problem is that clone_private_mount() has MNT_NS_INTERNAL which makes that trivially true. So that passes the test and attach_recursive_mnt() accepts that as a mount point and funny enough, count_mounts() dereferences MNT_NS_INTERNAL. The problem is it is an error pointer... So we can reach this in userspace via fanotify. A filesystem mark on the lower filesystem of an overlay reports paths on the layer clone and reading the event hands out a descriptor on it. For example with debugfs as the lower layer it goes kaboom: openat(evfd, "tracing", O_DIRECTORY) Oops: general protection fault KASAN: null-ptr-deref in range [0x1d0-0x1d7] RIP: 0010:count_mounts+0x35/0x200 attach_recursive_mnt finish_automount And since that sleeping beauty happens under namespace_sem held for writing every mount operation on the system blocks from then on. Congrats. Use is_mounted() instead which rejects unmounted and internal mounts alike. The open fails with EINVAL just as it did before clone_private_mount() used MNT_NS_INTERNAL.
CVE-2026-98978
2026년 10월 23일Linux 커널에서 다음 취약점이 해결되었다: namespace: 잠긴 마운트를 절대 만료시키지 않음 잠긴 마운트는 특별하다. 이들은 기본 파일과 디렉터리가 노출되는 것을 방지한다. do_umount()는 잠긴 마운트를 언마운트하는 것을 거부하지만 shrink_submounts()는 그렇지 않다. 축소 가능한 마운트는 사용자 네임스페이스 소유자가 MOVE_MOUNT_BENEATH로 잠긴 마운트 아래에 두면 잠길 수 있다. 잠긴 속성은 이제 맨 아래 마운트로 이동하여 상단 마운트를 언마운트할 수 있게 된다. 따라서 잠기지 않은 조상의 umount()는 이제 먼저 맨 아래 마운트를 만료시키고 덮인 디렉터리가 노출된다: move_mount(c -> x/hidden, MOVE_MOUNT_BENEATH) = 0 잠금이 이동한 후 덮개: umount2(x/hidden) = 0 잠금 보유자: umount2(x/hidden) = EINVAL 복사본의 루트, 사용 중: umount2(x) = EBUSY x/hidden/secret 읽기: "covered-by-root" 따라서 잠긴 마운트는 부모와 함께 사라질 때까지 그대로 두어야 한다. 잠긴 마운트 아래에 잠기지 않은 마운트를 일반 umount()하면 이제부터 EBUSY가 반환된다. 다른 잠긴 자식도 마찬가지이다. 지연 umount는 여전히 전체 트리를 처리한다. mark_mounts_for_expiry()는 잠긴 마운트를 절대 보지 않는다. lock_mnt_tree()는 만료 목록에 있는 마운트를 그대로 두며 다른 어떤 것도 잠긴 마운트를 그런 목록에 올리지 않는다. 이를 위한 assert를 추가했다.
CVE-2026-98977
2026년 10월 23일In the Linux kernel, the following vulnerability has been resolved: namespace: handle mount locking for automounts correctly If mounts are propagated across user namespaces, attach_recursive_mnt() locks every copy of the source mount to protect overmounts from vanishing and revealing the underlying files or directories. The user namespace is taken from the caller's mount namespaces since this is where the mounts end up. Except, that's not always true. Automounts may legitimately get popped in by tasks located in a different mount and user namespace during path lookup. Then check doesn't make sense at that point. The copy in the namespace of the parent - which may be the host's - is now locked and the host cannot change the flags of its own mounts anymore. Here's the reproducer: - host has debugfs mounted nosuid,nodev,noexec and shared - tracefs automount below it is not yet active - hand a child process a directory descriptor on that mount - child process enters auser and mount namespace - child process' namespace now holds a locked copy of the host's debugfs mount that receives propagation from it - child process stats "tracing/." through the descriptor - lookup runs on the host's mount so the automount lands below the host's mount - propagation puts a copy below the child's copy - both try to clear the flags on the mount they got, with a bind remount: host, on its own automount: MS_REMOUNT|MS_BIND = EPERM child, on the copy in its namespace: MS_REMOUNT|MS_BIND = 0 So the lock landed on the host's mount instead of the child's copy. Congrats. So we need to compare with the owner of the namespace the mount actually gets mounted on. For all regular cases that is the caller's mount namespace and so nothing changes. Detached trees in anonymous mount namespaces by be handed over via SCM_RIGHTS or inherited in other ways on purpose so the attaching task's mount namespace is authoritative, not the creator of the detached tree.
CVE-2026-98976
2026년 10월 23일Linux 커널에서 다음 취약점이 해결되었다: namespace: 전파된 복사본이 이동된 마운트 아래에 있을 때 마운트에 대한 잠금을 유지함 attach_recursive_mnt()는 MNT_LOCKED를 최상위 마운트에서 MOVE_MOUNT_BENEATH로 이동된 마운트로 전달한다. 이는 사용자 네임스페이스 소유자가 잠긴 /proc 또는 루트를 교체할 수 있게 한다. 아래에 있는 마운트는 기본 마운트포인트를 덮는 역할을 하여 최상위 마운트가 언마운트될 수 있도록 한다. 두 개의 마운트 네임스페이스를 고려하자: (H) 호스트 H는 P/d에 비밀이 있는 공유 마운트 P를 가지고 있다 (Z) Z는 M에서 생성된 사용자 네임스페이스이다. P의 복사본은 호스트의 P로부터 전파를 받고 M의 P/d 덮개 복사본은 잠겨 있다. Z의 소유자는 P/d를 볼 수 없어야 한다. 이제 (H)가 P/d에 X를 마운트한다. 이는 (Z)로 전파된다. X의 복사본은 (Z)의 잠긴 덮개 아래에 위치한다. 잠긴 속성은 (Z)의 덮개에서 그 아래로 전파된 X 복사본으로 전달된다. 덮개는 이제 잠금 해제된다. 이제 (H)가 다시 X를 언마운트한다. (Z)의 X 복사본이 언마운트되고 덮개 마운트는 P/d 위에 잠금 해제된 상태로 남는다. (Z)는 이제 이를 언마운트할 수 있다: Z: umount2(P/d) = EINVAL /* 덮개가 잠겨 있음 */ H: P/d에 X 마운트, X 언마운트 /* 둘 다 Z로 전파됨 */ Z: umount2(P/d) = 0 /* 덮개가 이제 잠금 해제됨 */ Z: P/d/secret 읽기 = "covered-by-root" /* 비밀이 노출됨 */ 따라서 호출자가 배치한 마운트에 대해서만 잠긴 속성을 아래 마운트로 전달한다. 잠긴 마운트 아래에 위치한 전파된 복사본도 잠겨 있어야 하며, 스택 맨 아래 마운트가 모든 검사에서 기대하는 대로 잠금을 유지한다. 위의 마운트는 전파된 마운트가 다시 언마운트되더라도 덮개 역할을 유지하도록 잠긴 상태로 남는다.
CVE-2026-98975
2026년 10월 23일Linux 커널에서 다음 취약점이 해결되었다: xfs: 매핑을 교환할 때 reflink 플래그 교환 중지 교환이 오프셋 0부터 i_disk_size까지 두 파일 모두를 포함할 때, xmi_can_exchange_reflink_flags()는 모든 매핑이 이동했다고 가정하고 reflink 플래그를 다른 파일로 넘긴다. 이 가정은 잘못되었다. 파일은 EXCHANGE_RANGE_TO_EOF가 더 작은 크기를 설정하고 아무것도 언매핑하지 않은 후에도 i_disk_size를 넘는 공유 블록을 여전히 소유할 수 있다. 플래그는 어쨌든 지워지고, 그런 블록에 대한 다음 쓰기는 CoW 대신 제자리에서 발생하여 공유하는 다른 파일을 손상시킨다. a23eca88448e 커밋("xfs: fix exchange-range reflink flag clearing issue with INO1_WRITTEN")이 이 문제의 한 사례를 수정했다. 또 다른 특수 사례를 추가하는 대신 플래그 이동을 중지한다. xfs_exchmaps_ensure_reflink()는 이미 교환 전에 두 인노드 모두에 플래그를 설정하므로 둘 다 유지한다. CLEAR_INO{1,2}_REFLINK를 설정하는 것은 더 이상 없다. 이전 커널에서 기록된 의도는 여전히 이를 포함할 수 있으나 복구 과정에서 이미 이를 마스킹하므로 로그 형식 마스크에 남아 무시된다. XFS_IOC_SWAPEXT도 동일한 문제를 가진다: extents와 함께 reflink 플래그를 한 인노드에서 다른 인노드로 이동한다. 단순히 이를 제거하는 것만으로는 충분하지 않다: 교환 경로는 xfs_exchmaps_ensure_reflink()에서 두 인노드 모두에 플래그를 미리 설정하지만, swapext에는 그런 단계가 없어 공유 extents를 받는 인노드가 플래그 없이 남게 된다. 대신 두 인노드 모두에 플래그를 설정하고, reflink 플래그가 있는 인노드는 CoW 포크를 가져야 하므로 두 인노드 모두 CoW 포크가 있는지 확인한다. 이 플래그는 이제 FALLOC_FL_UNSHARE_RANGE, xfs_scrub 또는 0으로 트렁케이트할 때까지 유지된다.
CVE-2026-98974
2026년 10월 23일Linux 커널에서 다음 취약점이 해결되었다: xfs: exchange-range-to-eof 파일 크기 교환 수정 Norbert Szetei가 XFS_IOC_EXCHANGE_RANGE의 TO_EOF 플래그에 있는 버그에 대한 불완전한 설명을 포함한 패치를 게시했다. 이 버그는 exchange-range가 파일을 수정하여 EOF를 넘는 공유 블록을 갖도록 속이는데, 이는 절대 허용되지 않는다. 파일은 EOF를 넘는 쓰여진 데이터를 가지지 않으며, 공유할 수 있는 것은 쓰여진 데이터 블록뿐이다. 이것이 뒤따르는 모든 잘못된 동작의 핵심이다. 결국 Norbert로부터 문제가 무엇인지에 대한 설명을 받았다: > 공정하다. 물리적 블록 번호, 4k 블록으로 설명한다. peer는 다시 쓰여지는 파일이고 file1은 플래그가 해제되는 파일이다. > > 시작, 공유 없음: > > peer 크기 4096 -> [100] > file1 크기 12288 -> [200] [201] [202] > donor1 크기 4096 -> [300] > donor2 크기 4096 -> [400] > > 1. FICLONERANGE peer의 블록을 file1의 중간 슬롯에 복제: > > peer 크기 4096 -> [100] > file1 크기 12288 -> [200] [100] [202] reflink 플래그 설정 > ^^^^^ 두 파일 모두 블록 100 소유 > > 2. XFS_IOC_EXCHANGE_RANGE file1과 donor1 교환, file1_offset 0, > file2_offset 8192, 길이 0, TO_EOF. 한 블록이 교환되고 크기도 교환됨: > > file1 크기 4096 -> [200] [100] [300] reflink 플래그 설정 > ^^^^^^^^^^^ 여전히 소유, 크기 넘음 > donor1 크기 12288 -> [202] > > file1은 한 블록 길이라고 하지만 세 개를 소유한다. 아무 것도 해제되지 않았다. file2_offset은 블록 2이므로 이 교환은 플래그를 해제할 수 없다. > > 3. XFS_IOC_EXCHANGE_RANGE file1과 donor2 교환, 두 오프셋 0, 길이 4096. > i_disk_size에 따르면 두 개의 한 블록 파일이 모든 것을 교환하므로 > xmi_can_exchange_reflink_flags()가 동의하고 플래그를 해제함: > > file1 크기 4096 -> [400] [100] [300] reflink 플래그 해제됨 > donor2 크기 4096 -> [200] > > 블록 100은 여전히 peer와 공유됨. > > 4. pwrite(file1, 4096, 4096), file1의 두 번째 슬롯인 블록 100. > xfs_is_cow_inode(file1)는 거짓이므로 CoW 없음: > > peer 크기 4096 -> [100] 같은 블록, 새 내용 > > 블록 100만 중요하다. 아래 PoC는 현재 디렉터리의 peer 파일을 읽는다. 파일시스템은 reflink과 exchange-range가 필요하며, mkfs.xfs 7.x가 기본으로 활성화한다. 따라서 TO_EOF는 실제로 데이터 블록을 올바르게 교환하더라도 파일 크기를 망가뜨린다. 다음은 XFS_EXCHANGE_RANGE_TO_EOF의 의도된 동작으로, 매뉴얼에 설명되어 있다: "길이 매개변수를 무시한다. file1_fd의 file1_offset부터 EOF까지 모든 바이트를 file2_fd로 이동하고, file2의 크기를 (file2_offset+(file1_length-file1_offset))로 설정한다. 동시에 file2의 file2_offset부터 EOF까지 모든 바이트를 file1로 이동하고 file1의 크기를 (file1_offset+(file2_length-file2_offset))로 설정한다." 즉, 파일 데이터의 일부만 교환한다면 교환된 데이터와 관련된 파일 크기 부분만 교환해야 한다. 불행히도 코드가 온디스크 파일 크기와 인코어 파일 크기를 교환하는데, 호출자가 0이 아닌 오프셋을 전달하면 이는 잘못된 것이다. 파일 크기를 혼동한 후 PoC는 비슷해 보이는 비-reflink 단일 블록 파일에 두 번째 exchange-range 호출을 사용한다. 파일 크기가 잘못 설정되어 exchange-range는 두 파일의 전체 내용을 교환한다고 생각하고 깨진 파일에서 reflink 플래그를 해제한다. 이것은 EOF 바로 뒤에 있는 공유 블록을 다시 쓰는 확장 쓰기를 가능하게 한다. 이것은 통칭하여 refluxfs로 알려져 있다. 파일 크기가 올바르게 설정되면 두 번째 exchange-range는 전체 내용 교환을 하지 않는다고 생각하여 어느 파일 인수에서도 reflink 플래그를 해제하지 않는다. Norbert는 이 패치의 이전 버전에 대해 i_disk_size 상태를 올바르게 처리하지 않는다는 두 번째 불만을 제기했다: > 오프셋은 인코어 i_size에 대해 제한되지만 빼기 연산은 > ---생략---
CVE-2026-98973
2026년 10월 23일In the Linux kernel, the following vulnerability has been resolved: drm/bridge: Fix unlocked list_del in drm_bridge_add() When re-adding a bridge that was previously removed, drm_bridge_add() drops it from bridge_lingering_list without holding bridge_lock. Both bridge_list and bridge_lingering_list are protected by bridge_lock, as they are concurrently modified by drm_bridge_remove() and __drm_bridge_free(), and walked by the debugfs 'bridges' file. Running the list_empty() test and the list_del_init() outside of the lock may therefore corrupt either list. Perform both under bridge_lock.
CVE-2026-98972
2026년 10월 23일In the Linux kernel, the following vulnerability has been resolved: cgroup/cpuset: Don't access cpuset_cgrp_subsys.root in is_in_v2_mode() After seeing the patch [1] to guard is_in_v2_mode() with RCU, it makes me realize that is_in_v2_mode() may be called in a context where a new cgroup filesystem is being rebound with stale cpuset_cgrp_subsys.root pointer. Avoid this potential UaF situation by adding a new cpuset_v2_mode flag which is set when the cpuset_v2_mode mount option is used. This flag is written into only when cpuset_bind() is being called with a stable cpuset_cgrp_subsys.root value. The is_in_v2_mode() helper is modified to read the new cpuset_v2_mode flag instead of accessing cpuset_cgrp_subsys.root directly. [1] https://lore.kernel.org/lkml/[email protected]
CVE-2026-98971
2026년 10월 23일In the Linux kernel, the following vulnerability has been resolved: gpio: exar: initialize the ID before registering its cleanup devm_add_action_or_reset() invokes the cleanup action immediately when registering the action fails. gpio_exar_probe() currently stores the allocated ID in exar_gpio only after registering the action, so that failure makes exar_devm_ida_free() release ID 0. If the allocated ID is nonzero, this leaks that ID and can free ID 0 belonging to another device. Store the ID before registering the cleanup action so both the immediate failure path and normal device teardown release the correct allocation.
CVE-2026-98970
2026년 10월 23일In the Linux kernel, the following vulnerability has been resolved: drm/vc4: Free the BO cache size list on teardown vc4_bo_cache_destroy() purges the cached BOs but never frees the size list, leaking it on every unbind.
CVE-2026-98969
2026년 10월 23일In the Linux kernel, the following vulnerability has been resolved: net/sched: em_text: reject unterminated algo before autoload This is a follow-up to commit 9c572a83037a ("net/sched: fix potential stack infoleak in em_text_dump()"), which zero-initialised the dump-side struct. Sashiko pointed at a pre-existing bug that exposed the change-side input-validation gap open. em_text_change() casts the raw netlink attribute payload to struct tcf_em_text and passes conf->algo, a 16-byte array with no enforced NUL terminator, to textsearch_prepare(). On the TS_AUTOLOAD retry textsearch_prepare() calls request_module("ts_%s", algo); vsnprintf() walks %s until it finds a NUL, so an algo[] with no NUL reads past the array into the adjacent struct fields and payload and feeds those bytes to the usermode helper command line. This is an out-of-bounds read and a kernel memory disclosure. Reject the attribute when no NUL exists within TC_EM_TEXT_ALGOSIZ bytes, matching the check xt_string has had since 3ab720881b6e. Conditions to recreate the bug: - CAP_NET_ADMIN on the target netns (namespace-local via unshare -Urn is enough) - install clsact on an interface, then add a basic filter with one text ematch whose algo[] is 16 bytes with no NUL (e.g. "A"*16) and pattern_len at least 1 - the add fails with -ENOENT and the kernel invokes modprobe with a module name made of "ts_" plus the 16 bytes and the adjacent payload
CVE-2026-98968
2026년 10월 23일Linux 커널에서 다음 취약점이 해결되었다: amt: 릴레이의 General Query를 수신 경로에서 직접 전송 qdisc에 큐잉된 skb가 skb->cb의 원시 포인터를 통해 참조하는 터널보다 오래 살아남을 수 있다. 예를 들어, 릴레이에서 igmp_qrv가 1로 설정된 경우 터널은 135초 동안 유지되며, amt 장치에서 180초의 netem 지연은 이를 초과한다; 터널이 만료되어 해제되면 이후의 dequeue가 amt_dev_xmit()에서 해제 후 사용(use-after-free)을 유발한다. BUG: KASAN: slab-use-after-free in amt_dev_xmit+0x2763/0x2e20 호출 추적: amt_dev_xmit+0x2763/0x2e20 [drivers/net/amt.c:1262] dev_hard_start_xmit+0x22f/0x620 sch_direct_xmit+0x12e/0xac0 netem_dequeue+0x333/0xc50 net_tx_action+0x35c/0xa60 amt_send_igmp_gq()와 amt_send_mld_gq()는 amt_rcv()의 rcu_read_lock_bh() 섹션 내에서 amt_request_handler()에서만 호출된다. amt_request_handler()는 이미 쿼리가 대상인 터널을 가지고 있다: 해당 섹션 내에서 터널을 찾거나 생성했다. dev_queue_xmit()로 쿼리를 큐잉하는 것은 다시 amt_dev_xmit()로 이어지며, 여기서 이더넷 헤더를 제거하고 해당 터널에 대해 amt_send_membership_query()를 호출한다. 두 송신자에서 직접 호출하도록 변경하여 amt_send_advertisement()가 수신 경로에서 전송하는 방식과 동일하게 한다. 쿼리는 qdisc에서 대기하지 않으며, 터널은 찾거나 생성한 RCU 섹션 내에서만 역참조되고 skb->cb에 아무것도 저장되지 않아 조회나 참조 카운트가 필요 없다. 더 이상 사용자가 없는 amt_dev_xmit()의 쿼리 분기, amt_skb_cb() 및 struct amt_skb_cb를 제거한다. 동작 변경사항: - 릴레이 자체의 General Queries는 더 이상 amt 장치의 송신 경로(즉, qdisc, tc 송신(clsact/tcx), netfilter 송신 훅 및 패킷 탭)를 통과하지 않는다. 여전히 언더레이에서는 UDP로 보인다. - 성공적으로 전송된 쿼리는 더 이상 tx_dropped로 계산되지 않는다. 이전 쿼리 분기는 unlock 레이블을 통해 나가 모든 전송된 쿼리를 드롭된 것으로 계산했다. - 사용자 공간 쿼리어와 같은 외부에서 릴레이의 amt_dev_xmit()에 도달하는 쿼리는 이제 IGMP/MLD 타입 스위치에서 드롭된다. 이전에는 skb->cb가 가진 내용을 신뢰했고, NULL 터널은 WARN_ON(1)을 발생시켰다.
CVE-2026-98967
2026년 10월 23일In the Linux kernel, the following vulnerability has been resolved: cxgb4/ch_ktls: disable softirqs around tid_list erases chcr_ktls_cpl_act_open_rpl() inserts into tid_list from the receive path using xa_insert_bh(). The array is shared by the adapter's connections and initialized with XA_FLAGS_LOCK_BH. However, chcr_ktls_dev_del() and the chcr_ktls_dev_add() error path use xa_erase(), which takes the XArray lock without disabling softirqs. When cleanup runs with softirqs enabled, a receive softirq for another connection on the same CPU can interrupt the erase and spin on the lock held by the interrupted task. Use xa_erase_bh() at both sites to match the insertion path.
CVE-2026-98966
2026년 10월 23일In the Linux kernel, the following vulnerability has been resolved: bonding: fix the program leak when XDP is replaced We need to release the reference on the old BPF prog, whether we are going to no-prog, or replacing the prog with another. Spotted by AI while running tests for the propagation series (leaked programs were accumulating). Selftest will come in the net-next series to avoid conflicts.
CVE-2026-98965
2026년 10월 23일Linux 커널에서 다음 취약점이 해결되었다: ice: Tx 도어벨을 위한 순서가 지정된 MMIO 쓰기 복원 NIC가 전송할 바이트 수를 추적하는 DQL 회계 상태인 dql->num_queued는 ICE 드라이버가 __netdev_tx_sent_queue()를 호출할 때 업데이트된다. 이후 드라이버는 하드웨어 큐 꼬리를 업데이트하여 NIC가 작업 큐 처리를 시작할 수 있게 한다. 큐 회계 업데이트는 NIC가 디스크립터 전송을 시작하기 전에 순서가 지정되어야 한다. 현재 전송 경로는 writel_relaxed()를 사용하여 하드웨어 도어벨을 업데이트하는데, 이는 arm64에서 writel()이 제공하는 일반 메모리 쓰기와 MMIO 레지스터 쓰기 간의 동일한 순서 보장을 제공하지 않는다. 이로 인해 NIC가 dql->num_queued 업데이트가 전역적으로 보이기 전에 디스크립터 전송을 시작하는 잠재적 경쟁 조건이 발생한다. NIC가 dql_completed()에서 업데이트를 관찰하기 전에 완료되면, 큐에 추가된 바이트보다 더 많은 바이트가 완료된 잘못된 상태를 감지한다. 이 경우 다음 BUG_ON이 트리거된다. BUG_ON(count > num_queued - dql->num_completed); 이는 지속적인 네트워크 부하 환경에서 Intel Corporation Ethernet Controller E810-XXV for SFP (rev 02)를 사용하는 arm64 머신에서 다음과 같은 크래시로 관찰되었다(트레이스는 축약됨). 테스트 커널에서 writel_relaxed()를 writel()로 교체하면 이전에 신뢰성 있게 재현되던 크래시가 제거되었다. kernel BUG at lib/dynamic_queue_limits.c:99 내부 오류: Oops - BUG: 00000000f2000800 [#1] SMP pc : dql_completed+0x268/0x2a0 lr : ice_clean_tx_irq+0x1d4/0x620 [ice] 호출 추적: dql_completed+0x268/0x2a0 (P) ice_napi_poll+0x94/0x520 [ice] __napi_poll+0x48/0x3f0 net_rx_action+0x194/0x420 이는 알림 메커니즘을 writel()에서 writel_relaxed()로 변경한 커밋 ccde82e90946("ice: add E830 Earliest TxTime First Offload support") 이전 동작을 복원한다.