{"id":"CVE-2024-53176","aliases":["CVE-2024-53176"],"related":[],"kind":"vulnerability","state":"published","title":"smb: During unmount, ensure all cached dir instances drop their dentry","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: During unmount, ensure all cached dir instances drop their dentry\n\nThe unmount process (cifs_kill_sb() calling close_all_cached_dirs()) can\nrace with various cached directory operations, which ultimately results\nin dentries not being dropped and these kernel BUGs:\n\nBUG: Dentry ffff88814f37e358{i=1000000000080,n=/}  still in use (2) [unmount of cifs cifs]\nVFS: Busy inodes after unmount of cifs (cifs)\n------------[ cut here ]------------\nkernel BUG at fs/super.c:661!\n\nThis happens when a cfid is in the process of being cleaned up when, and\nhas been removed from the cfids->entries list, including:\n\n- Receiving a lease break from the server\n- Server reconnection triggers invalidate_all_cached_dirs(), which\n  removes all the cfids from the list\n- The laundromat thread decides to expire an old cfid.\n\nTo solve these problems, dropping the dentry is done in queued work done\nin a newly-added cfid_put_wq workqueue, and close_all_cached_dirs()\nflushes that workqueue after it drops all the dentries of which it's\naware. This is a global workqueue (rather than scoped to a mount), but\nthe queued work is minimal.\n\nThe final cleanup work for cleaning up a cfid is performed via work\nqueued in the serverclose_wq workqueue; this is done separate from\ndropping the dentries so that close_all_cached_dirs() doesn't block on\nany server operations.\n\nBoth of these queued works expect to invoked with a cfid reference and\na tcon reference to avoid those objects from being freed while the work\nis ongoing.\n\nWhile we're here, add proper locking to close_all_cached_dirs(), and\nlocking around the freeing of cfid->dentry.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: During unmount, ensure all cached dir instances drop their dentry\n\nThe unmount process (cifs_kill_sb() calling close_all_cached_dirs()) can\nrace with various cached directory operations, which ultimately results\nin dentries not being dropped and these kernel BUGs:\n\nBUG: Dentry ffff88814f37e358{i=1000000000080,n=/}  still in use (2) [unmount of cifs cifs]\nVFS: Busy inodes after unmount of cifs (cifs)\n------------[ cut here ]------------\nkernel BUG at fs/super.c:661!\n\nThis happens when a cfid is in the process of being cleaned up when, and\nhas been removed from the cfids->entries list, including:\n\n- Receiving a lease break from the server\n- Server reconnection triggers invalidate_all_cached_dirs(), which\n  removes all the cfids from the list\n- The laundromat thread decides to expire an old cfid.\n\nTo solve these problems, dropping the dentry is done in queued work done\nin a newly-added cfid_put_wq workqueue, and close_all_cached_dirs()\nflushes that workqueue after it drops all the dentries of which it's\naware. This is a global workqueue (rather than scoped to a mount), but\nthe queued work is minimal.\n\nThe final cleanup work for cleaning up a cfid is performed via work\nqueued in the serverclose_wq workqueue; this is done separate from\ndropping the dentries so that close_all_cached_dirs() doesn't block on\nany server operations.\n\nBoth of these queued works expect to invoked with a cfid reference and\na tcon reference to avoid those objects from being freed while the work\nis ongoing.\n\nWhile we're here, add proper locking to close_all_cached_dirs(), and\nlocking around the freeing of cfid->dentry.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: smb: Durante el desmontaje, asegurarse de que todas las instancias de directorio en caché eliminen su dentry El proceso de desmontaje (cifs_kill_sb() llamando a close_all_cached_dirs()) puede competir con varias operaciones de directorio en caché, lo que en última instancia da como resultado que no se eliminen los dentries y estos ERRORES del kernel: ERROR: Dentry ffff88814f37e358{i=1000000000080,n=/} todavía en uso (2) [desmontaje de cifs cifs] VFS: Inodos ocupados después del desmontaje de cifs (cifs) ------------[ corte aquí ]------------ ¡ERROR del kernel en fs/super.c:661! Esto sucede cuando un cfid está en proceso de desinfección y se ha eliminado de la lista cfids-&gt;entries, lo que incluye: - Recibir una interrupción de arrendamiento del servidor - La reconexión del servidor activa invalidate_all_cached_dirs(), que elimina todos los cfids de la lista - El hilo de la lavandería decide hacer caducar un cfid antiguo. Para resolver estos problemas, se elimina el dentry en el trabajo en cola realizado en una cola de trabajo cfid_put_wq recién agregada, y close_all_cached_dirs() vacía esa cola de trabajo después de eliminar todos los dentries de los que tiene conocimiento. Esta es una cola de trabajo global (en lugar de tener un alcance de montaje), pero el trabajo en cola es mínimo. El trabajo de desinfección final para limpiar un cfid se realiza a través del trabajo en cola en la cola de trabajo serverclose_wq; esto se hace por separado de la eliminación de los dentries para que close_all_cached_dirs() no bloquee ninguna operación del servidor. Se espera que ambos trabajos en cola se invoquen con una referencia cfid y una referencia tcon para evitar que esos objetos se liberen mientras el trabajo está en curso. Mientras estamos aquí, agregue un bloqueo adecuado a close_all_cached_dirs() y un bloqueo alrededor de la liberación de cfid-&gt;dentry.","source":"nvd"}],"published":"2024-12-27T13:49:20.518Z","modified":"2026-08-05T11:44:23.051Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"ebe98f1447bbccf8228335c62d86af02a0ed23f7","fixed":"73934e535cffbda1490fa97d82690a0f9aa73e94","status":"affected"},{"type":"git","introduced":"ebe98f1447bbccf8228335c62d86af02a0ed23f7","fixed":"ff4528bbc82d0d90073751f7b49e7b9e9c7e5638","status":"affected"},{"type":"git","introduced":"ebe98f1447bbccf8228335c62d86af02a0ed23f7","fixed":"548812afd96982a76a93ba76c0582ea670c40d9e","status":"affected"},{"type":"git","introduced":"ebe98f1447bbccf8228335c62d86af02a0ed23f7","fixed":"3fa640d035e5ae526769615c35cb9ed4be6e3662","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.1","status":"unaffected"},{"type":"semver","introduced":"6.6.64","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.11.11","lastAffected":"6.11.*","status":"unaffected"},{"type":"semver","introduced":"6.12.2","lastAffected":"6.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.1","fixed":"6.6.64"},{"status":"affected","introduced":"6.7","fixed":"6.11.11"},{"status":"affected","introduced":"6.12","fixed":"6.12.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/73934e535cffbda1490fa97d82690a0f9aa73e94","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ff4528bbc82d0d90073751f7b49e7b9e9c7e5638","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/548812afd96982a76a93ba76c0582ea670c40d9e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3fa640d035e5ae526769615c35cb9ed4be6e3662","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-53176","url":"https://www.cve.org/CVERecord?id=CVE-2024-53176","licence":"CVE Terms of Use","modified":"2026-08-05T11:44:23.051Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-53176","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53176","licence":"Public domain","modified":"2026-08-04T11:22:01.380Z"}],"updatedAt":"2026-11-25T22:58:50.399Z","epss":{"score":0.00559,"percentile":0.47929,"date":"2026-12-01T12:00:22.000Z"}}