{"id":"CVE-2022-49761","aliases":["CVE-2022-49761"],"related":[],"kind":"vulnerability","state":"published","title":"btrfs: always report error in run_one_delayed_ref()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: always report error in run_one_delayed_ref()\n\nCurrently we have a btrfs_debug() for run_one_delayed_ref() failure, but\nif end users hit such problem, there will be no chance that\nbtrfs_debug() is enabled.  This can lead to very little useful info for\ndebugging.\n\nThis patch will:\n\n- Add extra info for error reporting\n  Including:\n  * logical bytenr\n  * num_bytes\n  * type\n  * action\n  * ref_mod\n\n- Replace the btrfs_debug() with btrfs_err()\n\n- Move the error reporting into run_one_delayed_ref()\n  This is to avoid use-after-free, the @node can be freed in the caller.\n\nThis error should only be triggered at most once.\n\nAs if run_one_delayed_ref() failed, we trigger the error message, then\ncausing the call chain to error out:\n\nbtrfs_run_delayed_refs()\n`- btrfs_run_delayed_refs()\n   `- btrfs_run_delayed_refs_for_head()\n      `- run_one_delayed_ref()\n\nAnd we will abort the current transaction in btrfs_run_delayed_refs().\nIf we have to run delayed refs for the abort transaction,\nrun_one_delayed_ref() will just cleanup the refs and do nothing, thus no\nnew error messages would be output.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: always report error in run_one_delayed_ref()\n\nCurrently we have a btrfs_debug() for run_one_delayed_ref() failure, but\nif end users hit such problem, there will be no chance that\nbtrfs_debug() is enabled.  This can lead to very little useful info for\ndebugging.\n\nThis patch will:\n\n- Add extra info for error reporting\n  Including:\n  * logical bytenr\n  * num_bytes\n  * type\n  * action\n  * ref_mod\n\n- Replace the btrfs_debug() with btrfs_err()\n\n- Move the error reporting into run_one_delayed_ref()\n  This is to avoid use-after-free, the @node can be freed in the caller.\n\nThis error should only be triggered at most once.\n\nAs if run_one_delayed_ref() failed, we trigger the error message, then\ncausing the call chain to error out:\n\nbtrfs_run_delayed_refs()\n`- btrfs_run_delayed_refs()\n   `- btrfs_run_delayed_refs_for_head()\n      `- run_one_delayed_ref()\n\nAnd we will abort the current transaction in btrfs_run_delayed_refs().\nIf we have to run delayed refs for the abort transaction,\nrun_one_delayed_ref() will just cleanup the refs and do nothing, thus no\nnew error messages would be output.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: btrfs: siempre informa el error en run_one_delayed_ref() Actualmente tenemos un btrfs_debug() para el fallo de run_one_delayed_ref(), pero si los usuarios finales se encuentran con dicho problema, no habrá ninguna posibilidad de que btrfs_debug() esté habilitado. Esto puede llevar a muy poca información útil para la depuración. Este parche hará lo siguiente: - Agregar información adicional para el informe de errores Incluyendo: * byte lógico * num_bytes * tipo * acción * ref_mod - Reemplazar btrfs_debug() con btrfs_err() - Mover el informe de errores a run_one_delayed_ref() Esto es para evitar el use-after-free, el @nodo se puede liberar en el llamador. Este error solo debe activarse como máximo una vez. Como si run_one_delayed_ref() fallara, se genera un mensaje de error, lo que provoca que la cadena de llamadas genere un error: btrfs_run_delayed_refs() `- btrfs_run_delayed_refs() `- btrfs_run_delayed_refs_for_head() `- run_one_delayed_ref(). Abortaremos la transacción actual en btrfs_run_delayed_refs(). Si necesitamos ejecutar referencias retrasadas para la transacción abortada, run_one_delayed_ref() simplemente las limpiará y no hará nada, por lo que no se generarán nuevos mensajes de error.","source":"nvd"}],"published":"2025-03-27T16:43:07.633Z","modified":"2026-06-17T05:19:04.920Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"79787eaab46121d4713ed03c8fc63b9ec3eaec76","fixed":"18bd1c9c02e64a3567f90c83c2c8b855531c8098","status":"affected"},{"type":"git","introduced":"79787eaab46121d4713ed03c8fc63b9ec3eaec76","fixed":"fdb4a70bb768d2a87890409597529ad81cb3de8a","status":"affected"},{"type":"git","introduced":"79787eaab46121d4713ed03c8fc63b9ec3eaec76","fixed":"853ffa1511b058c79a4c9bb1407b3b20ce311792","status":"affected"},{"type":"git","introduced":"79787eaab46121d4713ed03c8fc63b9ec3eaec76","fixed":"39f501d68ec1ed5cd5c66ac6ec2a7131c517bb92","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.4","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.4","status":"unaffected"},{"type":"semver","introduced":"5.10.165","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.90","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.8","lastAffected":"6.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.2","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","fixed":"5.10.165"},{"status":"affected","introduced":"5.11","fixed":"5.15.90"},{"status":"affected","introduced":"5.16","fixed":"6.1.8"},{"status":"affected","version":"6.2"},{"status":"affected","version":"6.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/18bd1c9c02e64a3567f90c83c2c8b855531c8098","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fdb4a70bb768d2a87890409597529ad81cb3de8a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/853ffa1511b058c79a4c9bb1407b3b20ce311792","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/39f501d68ec1ed5cd5c66ac6ec2a7131c517bb92","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-03-28T15:20:30.780Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49761","url":"https://www.cve.org/CVERecord?id=CVE-2022-49761","licence":"CVE Terms of Use","modified":"2026-05-11T19:06:16.175Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49761","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49761","licence":"Public domain","modified":"2026-06-17T05:19:04.920Z"}],"updatedAt":"2026-11-25T22:58:20.850Z","epss":{"score":0.00199,"percentile":0.10148,"date":"2026-12-01T12:00:22.000Z"}}