본문 바로가기
kcve.ai취약점 정보 · 내 서버 확인

CVE-2026-99449 usb: gadget: fix refcount underflow in gadgetfs_bind() error path

설명

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: fix refcount underflow in gadgetfs_bind() error path gadgetfs_bind() calls get_dev() only on the success path, but gadgetfs_unbind() called from the enomem error label unconditionally calls put_dev(). When bind fails (e.g. ENOMEM), put_dev() fires without a matching get_dev(), leaving the refcount unbalanced. A subsequent close of the ep0 file descriptor calls dev_release() -> put_dev() which hits zero and frees the object; then gadgetfs_kill_sb() calls put_dev(the_device) again on the already-freed pointer, triggering a refcount underflow and use-after-free. Fix by calling get_dev() at the start of gadgetfs_bind(), before any error path that invokes gadgetfs_unbind(), so the reference is always balanced regardless of whether bind succeeds or fails.

영향 받는 제품 제품 1개

  • Linux

    Linux

    해결 버전 있음

    영향 받는 버전

    • 6.12.117 미만
    • 6.18.61 미만
    • 7.3.2 미만

    해결 버전

    • 6.12.117 이상
    • 6.18.61 이상
    • 7.3.2 이상
‹ 목록

운영 중인 서버의 점검 지원 범위가 궁금하면

도입 문의