{"id":"CVE-2022-50755","summary":"udf: Avoid double brelse() in udf_rename()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nudf: Avoid double brelse() in udf_rename()\n\nsyzbot reported a warning like below [1]:\n\nVFS: brelse: Trying to free free buffer\nWARNING: CPU: 2 PID: 7301 at fs/buffer.c:1145 __brelse+0x67/0xa0\n...\nCall Trace:\n \u003cTASK\u003e\n invalidate_bh_lru+0x99/0x150\n smp_call_function_many_cond+0xe2a/0x10c0\n ? generic_remap_file_range_prep+0x50/0x50\n ? __brelse+0xa0/0xa0\n ? __mutex_lock+0x21c/0x12d0\n ? smp_call_on_cpu+0x250/0x250\n ? rcu_read_lock_sched_held+0xb/0x60\n ? lock_release+0x587/0x810\n ? __brelse+0xa0/0xa0\n ? generic_remap_file_range_prep+0x50/0x50\n on_each_cpu_cond_mask+0x3c/0x80\n blkdev_flush_mapping+0x13a/0x2f0\n blkdev_put_whole+0xd3/0xf0\n blkdev_put+0x222/0x760\n deactivate_locked_super+0x96/0x160\n deactivate_super+0xda/0x100\n cleanup_mnt+0x222/0x3d0\n task_work_run+0x149/0x240\n ? task_work_cancel+0x30/0x30\n do_exit+0xb29/0x2a40\n ? reacquire_held_locks+0x4a0/0x4a0\n ? do_raw_spin_lock+0x12a/0x2b0\n ? mm_update_next_owner+0x7c0/0x7c0\n ? rwlock_bug.part.0+0x90/0x90\n ? zap_other_threads+0x234/0x2d0\n do_group_exit+0xd0/0x2a0\n __x64_sys_exit_group+0x3a/0x50\n do_syscall_64+0x34/0xb0\n entry_SYSCALL_64_after_hwframe+0x63/0xcd\n\nThe cause of the issue is that brelse() is called on both ofibh.sbh\nand ofibh.ebh by udf_find_entry() when it returns NULL.  However,\nbrelse() is called by udf_rename(), too.  So, b_count on buffer_head\nbecomes unbalanced.\n\nThis patch fixes the issue by not calling brelse() by udf_rename()\nwhen udf_find_entry() returns NULL.","modified":"2026-04-02T08:28:44.749278Z","published":"2025-12-24T13:05:48.928Z","related":["SUSE-SU-2026:0263-1","SUSE-SU-2026:0316-1","SUSE-SU-2026:0317-1","SUSE-SU-2026:0411-1","SUSE-SU-2026:0617-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50755.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/090bf49833c51da297ec74f98ad2bf44daea9311"},{"type":"WEB","url":"https://git.kernel.org/stable/c/156d440dea97deada629bb51cb17887abd862605"},{"type":"WEB","url":"https://git.kernel.org/stable/c/40dba68d418237b1ae2beaa06d46a94dd946278e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4fca09045509f5bde8fc28e68fbca38cb4bdcf2e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/78eba2778ae10fb2a9d450e14d26eb6f6bf1f906"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9d2cad69547abea961fa80426d600b861de1952b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c791730f2554a9ebb8f18df9368dc27d4ebc38c2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d6da7ec0f94f5208c848e0e94b70f54a0bd9c587"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e7a6a53c871460727be09f4414ccb29fb8697526"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50755.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50755"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"231473f6ddcef9c01993e0bfe36acc6f8e425c31"},{"fixed":"78eba2778ae10fb2a9d450e14d26eb6f6bf1f906"},{"fixed":"9d2cad69547abea961fa80426d600b861de1952b"},{"fixed":"d6da7ec0f94f5208c848e0e94b70f54a0bd9c587"},{"fixed":"156d440dea97deada629bb51cb17887abd862605"},{"fixed":"40dba68d418237b1ae2beaa06d46a94dd946278e"},{"fixed":"e7a6a53c871460727be09f4414ccb29fb8697526"},{"fixed":"4fca09045509f5bde8fc28e68fbca38cb4bdcf2e"},{"fixed":"090bf49833c51da297ec74f98ad2bf44daea9311"},{"fixed":"c791730f2554a9ebb8f18df9368dc27d4ebc38c2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50755.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.2.0"},{"fixed":"4.9.337"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.10.0"},{"fixed":"4.14.303"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.15.0"},{"fixed":"4.19.270"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.20.0"},{"fixed":"5.4.229"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.86"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.0.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"fixed":"6.1.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50755.json"}}],"schema_version":"1.7.5"}