CVE-2022-50755

Source
https://cve.org/CVERecord?id=CVE-2022-50755
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50755.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50755
Downstream
Related
Published
2025-12-24T13:05:48.928Z
Modified
2026-03-12T03:26:50.352712Z
Summary
udf: Avoid double brelse() in udf_rename()
Details

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: <TASK> invalidatebhlru+0x99/0x150 smpcallfunctionmanycond+0xe2a/0x10c0 ? genericremapfilerangeprep+0x50/0x50 ? __brelse+0xa0/0xa0 ? __mutexlock+0x21c/0x12d0 ? smpcalloncpu+0x250/0x250 ? rcu_readlockschedheld+0xb/0x60 ? lockrelease+0x587/0x810 ? __brelse+0xa0/0xa0 ? genericremapfile_rangeprep+0x50/0x50 oneachcpucondmask+0x3c/0x80 blkdevflushmapping+0x13a/0x2f0 blkdevputwhole+0xd3/0xf0 blkdevput+0x222/0x760 deactivatelockedsuper+0x96/0x160 deactivatesuper+0xda/0x100 cleanupmnt+0x222/0x3d0 taskworkrun+0x149/0x240 ? taskworkcancel+0x30/0x30 doexit+0xb29/0x2a40 ? reacquireheldlocks+0x4a0/0x4a0 ? dorawspinlock+0x12a/0x2b0 ? mmupdatenextowner+0x7c0/0x7c0 ? rwlockbug.part.0+0x90/0x90 ? zapotherthreads+0x234/0x2d0 dogroupexit+0xd0/0x2a0 _x64sysexitgroup+0x3a/0x50 dosyscall64+0x34/0xb0 entrySYSCALL64afterhwframe+0x63/0xcd

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

This patch fixes the issue by not calling brelse() by udfrename() when udffind_entry() returns NULL.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50755.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / 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/osv-test-cve-osv-conversion/osv-output/CVE-2022-50755.json"

Linux / Kernel

Package

Name
Kernel

Affected 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/osv-test-cve-osv-conversion/osv-output/CVE-2022-50755.json"