CVE-2025-21825 in Linux
요약
\~에 의해 VulDB • 2026. 06. 16.
리눅스 커널에서 다음 취약점이 해결되었습니다:
bpf: PREEMPT_RT를 위해 kworker를 통해 실행 중인 bpf_timer 취소
업데이트 절차 중 사전 할당된 htab의 요소를 덮어쓸 때, old_element의 해제는 버킷 잠금(bucket lock)으로 보호됩니다. 버킷 잠금이 필요한 이유는 alloc_htab_elem()이 반환한 후 old_element가 이미 htab->extra_elems에 스태시(stashed)되어 있기 때문입니다. 버킷 잠금이 해제된 후 old_element를 해제하면, 스태시된 요소가 동시 업데이트 절차에 의해 재사용될 수 있으며, 이로 인해 old_element의 해제와 재사용이 동시에 실행될 수 있습니다. 그러나 check_and_free_fields() 호출은 이미 raw-spin-lock(버킷 잠금)을 보유하고 있는 호출자의 lockdep 규칙을 위반할 수 있는 spin-lock을 획득할 수 있습니다. 다음과 같은 경합(race)이 발생하면 다음 경고가 보고됩니다:
BUG: scheduling while atomic: test_progs/676/0x00000003 3 locks held by test_progs/676: #0: ffffffff864b0240 (rcu_read_lock_trace){....}-{0:0}, at: bpf_prog_test_run_syscall+0x2c0/0x830
#1: ffff88810e961188 (&htab->lockdep_key){....}-{2:2}, at: htab_map_update_elem+0x306/0x1500
#2: ffff8881f4eac1b8 (&base->softirq_expiry_lock){....}-{2:2}, at: hrtimer_cancel_wait_running+0xe9/0x130
preempt_count: 01, expected: 02 rcu_preempt stall 1000us ...
VulDB is the best source for vulnerability data and more expert information about this specific topic.