VYPR
Unrated severityNVD Advisory· Published Dec 24, 2025· Updated Apr 15, 2026

CVE-2022-50755

CVE-2022-50755

Description

In the Linux kernel, the following vulnerability has been resolved:

udf: Avoid double brelse() in udf_rename()

syzbot reported a warning like below [1]:

VFS: brelse: Trying to free free buffer WARNING: CPU: 2 PID: 7301 at fs/buffer.c:1145 __brelse+0x67/0xa0 ... Call Trace:

invalidate_bh_lru+0x99/0x150 smp_call_function_many_cond+0xe2a/0x10c0 ? generic_remap_file_range_prep+0x50/0x50 ? __brelse+0xa0/0xa0 ? __mutex_lock+0x21c/0x12d0 ? smp_call_on_cpu+0x250/0x250 ? rcu_read_lock_sched_held+0xb/0x60 ? lock_release+0x587/0x810 ? __brelse+0xa0/0xa0 ? generic_remap_file_range_prep+0x50/0x50 on_each_cpu_cond_mask+0x3c/0x80 blkdev_flush_mapping+0x13a/0x2f0 blkdev_put_whole+0xd3/0xf0 blkdev_put+0x222/0x760 deactivate_locked_super+0x96/0x160 deactivate_super+0xda/0x100 cleanup_mnt+0x222/0x3d0 task_work_run+0x149/0x240 ? task_work_cancel+0x30/0x30 do_exit+0xb29/0x2a40 ? reacquire_held_locks+0x4a0/0x4a0 ? do_raw_spin_lock+0x12a/0x2b0 ? mm_update_next_owner+0x7c0/0x7c0 ? rwlock_bug.part.0+0x90/0x90 ? zap_other_threads+0x234/0x2d0 do_group_exit+0xd0/0x2a0 __x64_sys_exit_group+0x3a/0x50 do_syscall_64+0x34/0xb0 entry_SYSCALL_64_after_hwframe+0x63/0xcd

The cause of the issue is that brelse() is called on both ofibh.sbh and ofibh.ebh by udf_find_entry() when it returns NULL. However, brelse() is called by udf_rename(), too. So, b_count on buffer_head becomes unbalanced.

This patch fixes the issue by not calling brelse() by udf_rename() when udf_find_entry() returns NULL.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A double brelse() in the Linux kernel's UDF filesystem rename operation can trigger a kernel warning and crash.

Vulnerability

CVE-2022-50755 describes a use-after-free style bug in the UDF filesystem implementation within the Linux kernel/fs/udf/namei.c. When udf_rename() calls udf_find_entry() and that function returns NULL, it still calls brelse() on both ofibh.sbh and ofibh.ebh buffer heads. However, udf_rename() also calls brelse() on the same buffer heads, resulting in a double free of the buffer head reference count. The kernel detects this via a WARN_ON in __brelse() and can cause system instability.

Exploitation

To trigger the bug, an attacker needs the ability to rename files within a UDF filesystem (mounted read-write) while the directory entry lookup fails. The attack surface is local, requiring the ability to execute a create UDF filesystem and perform rename operations with specific directory entry patterns that cause udf_find_entry() to return NULL. No authentication beyond normal file system access is needed.

Impact

The double brelse() causes the buffer head's b_count to become unbalanced, leading to a kernel warning and potentially a kernel panic (denial of service). The bug does not appear to allow arbitrary code execution or privilege escalation based on the official description and references.

Mitigation

Patches are available from the stable kernel trees [1][2][3]. The fix removes the redundant brelse() calls from udf_rename() when udf_find_entry() returns NULL, letting the lookup. Ensure systems are updated to a kernel version containing the fix.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

9

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

9

News mentions

0

No linked articles in our index yet.