🔍 CVE-2026-99000

0.0
CVSS Score
UNKNOWN
2026-10-23
2026-10-23 13:17
✅ 완료

🇰🇷 한글 설명

Linux 커널 DRM/Xe 드라이버에서 외부 BO(dma-buf)의 중첩 pin/unpin 호출 시 shrinker 메모리 accounting이 중복 증감되어 카운트가 언더플로우되는 문제가 수정되었습니다. 또한 imported dma-buf에 대한 accounting 누락 및 잘못된 차감 문제도 함께 해결되었습니다.

💡 쉬운 설명

그래픽 드라이버가 메모리 사용량을 잘못 계산해서, 메모리가 부족할 때 시스템이 불필요하게 메모리 회수 작업을 반복할 수 있었습니다. 이 문제는 계산 로직을 고쳐서 해결되었습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: drm/xe: Fix shrinker accounting double-subtraction on nested external pins xe_bo_pin_external() and xe_bo_unpin_external() support nested pins, since the underlying ttm_bo_pin()/ttm_bo_unpin() maintain a pin_count refcount rather than a boolean. However, the shrinker accounting calls xe_ttm_tt_account_subtract() and xe_ttm_tt_account_add() are invoked unconditionally on every pin_external()/unpin_external() call, instead of only on the transition into and out of the pinned state. An external BO (dma-buf) can be pinned more than once while already pinned, for example when it has multiple attachments/importers, each independently calling xe_bo_pin_external(). Each such nested pin subtracts the BO's pages from the shrinker's accounting again, even though the BO's pages were already removed from consideration by the first pin. Symmetrically, each nested unpin adds them back again before the BO is actually unpinned. This desynchronizes the shrinker's page and object counts from reality, and since they are declared as signed long but interpreted as unsigned long in xe_shrinker_count(), the underflow can turn into an enormous shrinkable/purgeable page count, causing the shrinker to be invoked excessively under memory pressure. Guard the accounting calls with the same pin-count transition checks already used to guard the pinned_link list maintenance, so accounting is only updated on the outermost pin and the final unpin. While centralizing this logic into xe_bo_account_pin()/ xe_bo_account_unpin(), also close a second, related accounting gap affecting imported dma-bufs. For an imported bo's ttm_tt, xe's ttm_tt_populate hook (xe_ttm_tt_populate()) early-returns without calling xe_ttm_tt_account_add(), since TTM_TT_FLAG_EXTERNAL is set without TTM_TT_FLAG_EXTERNAL_MAPPABLE. However, TTM core's ttm_tt_populate() wrapper unconditionally marks the tt as populated on driver-hook success, so ttm_tt_is_populated() still reports true for it. xe_bo_account_pin()/xe_bo_account_unpin() trusted ttm_tt_is_populated() as a proxy for "these pages are accounted for by the shrinker", and would subtract/add pages for such a tt that were never added in the first place, again underflowing the shrinker's counts. This is reachable today via xe_bo_pin_external(), and would have become newly reachable via the fb-pin path once this patch routes __xe_pin_fb_vma() through xe_bo_pin_account() below, so fix it here rather than in a later patch, to avoid a commit in this series that introduces the regression before fixing it. Skip the accounting for imported bos, using the same EXTERNAL && !EXTERNAL_MAPPABLE test xe_ttm_tt_populate()/xe_ttm_tt_unpopulate() use to decide whether to act, via a new xe_ttm_bo_is_imported() helper (hoisted up from its only prior use site). v2: - Fix the critical issue caught by Sashiko AI review: the pin-count transition check introduced here was still bypassed by the fb-pin path (__xe_pin_fb_vma()/__xe_unpin_fb_vma()), which could leave a stale pinned_link entry and a permanent shrinker accounting leak when the fb-unpin performed the true last unpin. Addressed in a separate follow-up patch in this series rather than folded in here, since it is a distinct bug with its own Fixes: tag. - Drop the unneeded local "last_unpin" variable in xe_bo_unpin_external(), restoring the original inline bo->ttm.pin_count == 1 check; it was a no-op rename not used by any of the new accounting helpers, and was going to be deleted again by the follow-up patch anyway. v3: - Exclude imported dma-bufs from the pin/unpin shrinker accounting, fixing another underflow caught by Sashiko AI review. - Add a short comment on the backup-object pin site noting it's already populated/accounted at pin time, addressing (as a false-positive clarification, no code fix needed) a separate Medium-severity accounting-leak concern also caught by Sashiko AI ---truncated---

📍 영향받는 시스템

Linux 커널의 DRM/Xe 드라이버를 사용하는 Intel Xe 기반 GPU 시스템 (수정 커밋 이전 커널 버전)

⚔️ 공격 벡터

일반적으로 로컬 사용자가 여러 importer가 연결된 dma-buf를 반복적으로 pin하여 메모리 회수기를 과도하게 유발하는 방식으로 성능 저하(DoS)를 일으킬 수 있으나, CVSS 점수가 0.0으로 공식 평가가 없는 상태입니다.

🛡️ 대응 방법

배포판 벤더가 제공하는 최신 Linux 커널 업데이트를 설치하고 재부팅하십시오.

🔧 검증 코드

출력된 커널 버전을 배포판 보안 공지 또는 커널 changelog와 비교하여 해당 수정 커밋이 포함된 버전인지 확인하십시오. 수정 이전 버전이면 업데이트가 필요합니다.

Shell / Script
uname -r

💻 영향받는 소프트웨어

Linux Kernel