{"id":"CVE-2025-68239","aliases":["CVE-2025-68239"],"related":[],"kind":"vulnerability","state":"published","title":"binfmt_misc: restore write access before closing files opened by open_exec()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbinfmt_misc: restore write access before closing files opened by open_exec()\n\nbm_register_write() opens an executable file using open_exec(), which\ninternally calls do_open_execat() and denies write access on the file to\navoid modification while it is being executed.\n\nHowever, when an error occurs, bm_register_write() closes the file using\nfilp_close() directly. This does not restore the write permission, which\nmay cause subsequent write operations on the same file to fail.\n\nFix this by calling exe_file_allow_write_access() before filp_close() to\nrestore the write permission properly.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbinfmt_misc: restore write access before closing files opened by open_exec()\n\nbm_register_write() opens an executable file using open_exec(), which\ninternally calls do_open_execat() and denies write access on the file to\navoid modification while it is being executed.\n\nHowever, when an error occurs, bm_register_write() closes the file using\nfilp_close() directly. This does not restore the write permission, which\nmay cause subsequent write operations on the same file to fail.\n\nFix this by calling exe_file_allow_write_access() before filp_close() to\nrestore the write permission properly.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nbinfmt_misc: restaurar el acceso de escritura antes de cerrar archivos abiertos por open_exec()\n\nbm_register_write() abre un archivo ejecutable usando open_exec(), que internamente llama a do_open_execat() y deniega el acceso de escritura en el archivo para evitar modificaciones mientras se está ejecutando.\n\nSin embargo, cuando ocurre un error, bm_register_write() cierra el archivo usando filp_close() directamente. Esto no restaura el permiso de escritura, lo que puede causar que operaciones de escritura posteriores en el mismo archivo fallen.\n\nSolucione esto llamando a exe_file_allow_write_access() antes de filp_close() para restaurar el permiso de escritura correctamente.","source":"nvd"}],"published":"2025-12-16T14:21:16.889Z","modified":"2026-10-15T02:18:10.687Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"e7850f4d844e0acfac7e570af611d89deade3146","fixed":"54274ff90488b6c0f595a6518faed3cf0bc966eb","status":"affected"},{"type":"git","introduced":"e7850f4d844e0acfac7e570af611d89deade3146","fixed":"480ac88431703f2adbb8e6b5bd73c3f3cf9f3d7f","status":"affected"},{"type":"git","introduced":"e7850f4d844e0acfac7e570af611d89deade3146","fixed":"fbab8c08e1a6dbaef81e22d672a7647553101d16","status":"affected"},{"type":"git","introduced":"e7850f4d844e0acfac7e570af611d89deade3146","fixed":"6cce7bc7fac8471c832696720d9c8f2a976d9c54","status":"affected"},{"type":"git","introduced":"e7850f4d844e0acfac7e570af611d89deade3146","fixed":"e785f552ab04dbca01d31f0334f4561240b04459","status":"affected"},{"type":"git","introduced":"e7850f4d844e0acfac7e570af611d89deade3146","fixed":"90f601b497d76f40fa66795c3ecf625b6aced9fd","status":"affected"},{"type":"git","version":"467a50d5db7deaf656e18a1f633be9ecd94b393a","status":"affected"},{"type":"git","version":"4a8b4124ea4156ca52918b66c750a69c6d932aa5","status":"affected"},{"type":"git","version":"3fe116e33a855bbfdd32dc207e9be2a41e3ed3a6","status":"affected"},{"type":"git","version":"c0e0ab60d0b15469e69db93215dad009999f5a5b","status":"affected"},{"type":"git","version":"5ab9464a2a3c538eedbb438f1802f2fd98d0953f","status":"affected"},{"type":"git","version":"d28492be82e19fc69cc69975fc2052b37ef0c821","status":"affected"},{"type":"semver","introduced":"4.9.262","fixed":"4.10","status":"affected"},{"type":"semver","introduced":"4.14.226","fixed":"4.15","status":"affected"},{"type":"semver","introduced":"4.19.181","fixed":"4.20","status":"affected"},{"type":"semver","introduced":"5.4.106","fixed":"5.5","status":"affected"},{"type":"semver","introduced":"5.10.24","fixed":"5.11","status":"affected"},{"type":"semver","introduced":"5.11.7","fixed":"5.12","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.12","status":"unaffected"},{"type":"semver","introduced":"5.15.209","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.167","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.130","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.78","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.9","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/54274ff90488b6c0f595a6518faed3cf0bc966eb","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/480ac88431703f2adbb8e6b5bd73c3f3cf9f3d7f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fbab8c08e1a6dbaef81e22d672a7647553101d16","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6cce7bc7fac8471c832696720d9c8f2a976d9c54","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e785f552ab04dbca01d31f0334f4561240b04459","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/90f601b497d76f40fa66795c3ecf625b6aced9fd","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68239","url":"https://www.cve.org/CVERecord?id=CVE-2025-68239","licence":"CVE Terms of Use","modified":"2026-10-15T01:09:40.623Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68239","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68239","licence":"Public domain","modified":"2026-10-15T02:18:10.687Z"}],"updatedAt":"2026-11-25T22:59:09.507Z","epss":{"score":0.00211,"percentile":0.11942,"date":"2026-12-02T12:00:21.000Z"}}