🔍 CVE-2025-23138

5.5
CVSS Score
MEDIUM
2025-04-16
2026-11-05 21:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 watch_queue 기능에서 watch_queue_set_size()가 파이프 버퍼 사용량을 user->pipe_bufs에 반영하면서도 pipe->nr_accounted는 갱신하지 않아 회계 불일치가 발생합니다. 이로 인해 파이프 해제 시 카운터 언더플로우가 일어날 수 있으며, 이후 too_many_pipe_buffers_soft() 검사가 -EPERM으로 실패할 수 있습니다. 수정은 watch_queue_set_size()에서 파이프 사용량을 명시적으로 계정 처리하는 것입니다.

💡 쉬운 설명

리눅스 커널 내부에서 파이프 메모리 사용량을 계산하는 장부가 일부 어긋나는 문제입니다. 이 장부 오류가 누적되면 정상적인 파이프 생성이 거부되는 등 시스템 자원 관리에 영향을 줄 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: watch_queue: fix pipe accounting mismatch Currently, watch_queue_set_size() modifies the pipe buffers charged to user->pipe_bufs without updating the pipe->nr_accounted on the pipe itself, due to the if (!pipe_has_watch_queue()) test in pipe_resize_ring(). This means that when the pipe is ultimately freed, we decrement user->pipe_bufs by something other than what than we had charged to it, potentially leading to an underflow. This in turn can cause subsequent too_many_pipe_buffers_soft() tests to fail with -EPERM. To remedy this, explicitly account for the pipe usage in watch_queue_set_size() to match the number set via account_pipe_buffers() (It's unclear why watch_queue_set_size() does not update nr_accounted; it may be due to intentional overprovisioning in watch_queue_set_size()?)

📍 영향받는 시스템

패치가 적용되지 않은 Linux 커널 (watch_queue 기능이 활성화된 버전)

⚔️ 공격 벡터

로컬 사용자가 watch_queue 기능으로 파이프 크기를 조정해 회계 불일치를 유발하고, 서비스 거부(파이프 생성 실패) 상태를 만들 수 있음

🛡️ 대응 방법

배포판 벤더가 제공하는 보안 업데이트 커널로 업그레이드하고 재부팅

🔧 검증 코드

출력된 커널 버전을 배포판 보안 공지에서 CVE-2025-23138 수정 포함 여부와 대조하며, 해당 수정이 포함된 빌드인지 확인합니다 (배포판 패키지 변경로그 조회 권장).

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Linux Kernel