# CVE-2022-49337: ocfs2: dlmfs: fix error handling of user\_dlm\_destroy\_lock

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2025-02-26T02:10:55.696Z
- **Modified:** 2026-08-05T08:54:48.008Z

## Who should check

- Anyone running Linux \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 1434cd71ad9f3a6beda3036972983b6c4869207c; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 02480e2e82ae0e5588374bbbcf4fa6e4959fa174; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 733a35c00ef363a1c774d7ea486e0735b7c13a15; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 82bf8e7271fade40184177cb406203addc34c4a0; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 337e36550788dbe03254f0593a231c1c4873b20d; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 9c96238fac045b289993d7bc5aae7b2d72b25c76; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< efb54ec548829e1d3605f0434526f86e345b1b28; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 2c5e26a626fe46675bceba853e12aaf13c712e10; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 863e0d81b6683c4cbc588ad831f560c90e494bef
- Anyone running Linux 2.6.17

## Description

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

ocfs2: dlmfs: fix error handling of user\_dlm\_destroy\_lock

When user\_dlm\_destroy\_lock failed, it didn't clean up the flags it set
before exit.  For USER\_LOCK\_IN\_TEARDOWN, if this function fails because of
lock is still in used, next time when unlink invokes this function, it
will return succeed, and then unlink will remove inode and dentry if lock
is not in used(file closed), but the dlm lock is still linked in dlm lock
resource, then when bast come in, it will trigger a panic due to
user-after-free.  See the following panic call trace.  To fix this,
USER\_LOCK\_IN\_TEARDOWN should be reverted if fail.  And also error should
be returned if USER\_LOCK\_IN\_TEARDOWN is set to let user know that unlink
fail.

For the case of ocfs2\_dlm\_unlock failure, besides USER\_LOCK\_IN\_TEARDOWN,
USER\_LOCK\_BUSY is also required to be cleared.  Even though spin lock is
released in between, but USER\_LOCK\_IN\_TEARDOWN is still set, for
USER\_LOCK\_BUSY, if before every place that waits on this flag,
USER\_LOCK\_IN\_TEARDOWN is checked to bail out, that will make sure no flow
waits on the busy flag set by user\_dlm\_destroy\_lock(), then we can
simplely revert USER\_LOCK\_BUSY when ocfs2\_dlm\_unlock fails.  Fix
user\_dlm\_cluster\_lock() which is the only function not following this.

\[  941.336392\] (python,26174,16):dlmfs\_unlink:562 ERROR: unlink
004fb0000060000b5a90b8c847b72e1, error -16 from destroy
\[  989.757536\] ------------\[ cut here \]------------
\[  989.757709\] kernel BUG at fs/ocfs2/dlmfs/userdlm.c:173!
\[  989.757876\] invalid opcode: 0000 \[\#1\] SMP
\[  989.758027\] Modules linked in: ksplice\_2zhuk2jr\_ib\_ipoib\_new(O)
ksplice\_2zhuk2jr(O) mptctl mptbase xen\_netback xen\_blkback xen\_gntalloc
xen\_gntdev xen\_evtchn cdc\_ether usbnet mii ocfs2 jbd2 rpcsec\_gss\_krb5
auth\_rpcgss nfsv4 nfsv3 nfs\_acl nfs fscache lockd grace ocfs2\_dlmfs
ocfs2\_stack\_o2cb ocfs2\_dlm ocfs2\_nodemanager ocfs2\_stackglue configfs bnx2fc
fcoe libfcoe libfc scsi\_transport\_fc sunrpc ipmi\_devintf bridge stp llc
rds\_rdma rds bonding ib\_sdp ib\_ipoib rdma\_ucm ib\_ucm ib\_uverbs ib\_umad
rdma\_cm ib\_cm iw\_cm falcon\_lsm\_serviceable(PE) falcon\_nf\_netcontain(PE)
mlx4\_vnic falcon\_kal(E) falcon\_lsm\_pinned\_13402(E) mlx4\_ib ib\_sa ib\_mad
ib\_core ib\_addr xenfs xen\_privcmd dm\_multipath iTCO\_wdt iTCO\_vendor\_support
pcspkr sb\_edac edac\_core i2c\_i801 lpc\_ich mfd\_core ipmi\_ssif i2c\_core ipmi\_si
ipmi\_msghandler
\[  989.760686\]  ioatdma sg ext3 jbd mbcache sd\_mod ahci libahci ixgbe dca ptp
pps\_core vxlan udp\_tunnel ip6\_udp\_tunnel megaraid\_sas mlx4\_core crc32c\_intel
be2iscsi bnx2i cnic uio cxgb4i cxgb4 cxgb3i libcxgbi ipv6 cxgb3 mdio
libiscsi\_tcp qla4xxx iscsi\_boot\_sysfs libiscsi scsi\_transport\_iscsi wmi
dm\_mirror dm\_region\_hash dm\_log dm\_mod \[last unloaded:
ksplice\_2zhuk2jr\_ib\_ipoib\_old\]
\[  989.761987\] CPU: 10 PID: 19102 Comm: dlm\_thread Tainted: P           OE
4.1.12-124.57.1.el6uek.x86\_64 \#2
\[  989.762290\] Hardware name: Oracle Corporation ORACLE SERVER
X5-2/ASM,MOTHERBOARD,1U, BIOS 30350100 06/17/2021
\[  989.762599\] task: ffff880178af6200 ti: ffff88017f7c8000 task.ti:
ffff88017f7c8000
\[  989.762848\] RIP: e030:\[\<ffffffffc07d4316\>\]  \[\<ffffffffc07d4316\>\]
\_\_user\_dlm\_queue\_lockres.part.4+0x76/0x80 \[ocfs2\_dlmfs\]
\[  989.763185\] RSP: e02b:ffff88017f7cbcb8  EFLAGS: 00010246
\[  989.763353\] RAX: 0000000000000000 RBX: ffff880174d48008 RCX:
0000000000000003
\[  989.763565\] RDX: 0000000000120012 RSI: 0000000000000003 RDI:
ffff880174d48170
\[  989.763778\] RBP: ffff88017f7cbcc8 R08: ffff88021f4293b0 R09:
0000000000000000
\[  989.763991\] R10: ffff880179c8c000 R11: 0000000000000003 R12:
ffff880174d48008
\[  989.764204\] R13: 0000000000000003 R14: ffff880179c8c000 R15:
ffff88021db7a000
\[  989.764422\] FS:  0000000000000000(0000) GS:ffff880247480000(0000)
knlGS:ffff880247480000
\[  989.764685\] CS:  e033 DS: 0000 ES: 0000 CR0: 0000000080050033
\[  989.764865\] CR2: ffff8000007f6800 CR3: 0000000001ae0000 CR4:
0000000000042660
\[  989.765081\] Stack:
\[  989.765167\]  00000000000
---truncated---

## Affected and fixed versions

- Linux: \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 1434cd71ad9f3a6beda3036972983b6c4869207c; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 02480e2e82ae0e5588374bbbcf4fa6e4959fa174; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 733a35c00ef363a1c774d7ea486e0735b7c13a15; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 82bf8e7271fade40184177cb406203addc34c4a0; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 337e36550788dbe03254f0593a231c1c4873b20d; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 9c96238fac045b289993d7bc5aae7b2d72b25c76; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< efb54ec548829e1d3605f0434526f86e345b1b28; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 2c5e26a626fe46675bceba853e12aaf13c712e10; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 863e0d81b6683c4cbc588ad831f560c90e494bef (cvelist)
- Linux: 2.6.17 (cvelist)

## Mitigation

- Upgrade Linux to 863e0d81b6683c4cbc588ad831f560c90e494bef or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49337. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49337.md
Affected: Linux >= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, < 1434cd71ad9f3a6beda3036972983b6c4869207c; >= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, < 02480e2e82ae0e5588374bbbcf4fa6e4959fa174; >= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, < 733a35c00ef363a1c774d7ea486e0735b7c13a15; >= 2cd9888590c52ac7592e360…
Fixed in: Linux 1434cd71ad9f3a6beda3036972983b6c4869207c, Linux 02480e2e82ae0e5588374bbbcf4fa6e4959fa174, Linux 733a35c00ef363a1c774d7ea486e0735b7c13a15, Linux 82bf8e7271fade40184177cb406203addc34c4a0, Linux 337e36550788dbe03254f0593a231c1c4873b20d, Linux 9c96238fac045b289993d7bc5aae7b2d72b25c76, Linux 2c5e2…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-49337 being exploited?

There is no confirmed exploitation: CVE-2022-49337 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.24% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49337?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49337?

Linux \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 1434cd71ad9f3a6beda3036972983b6c4869207c; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 02480e2e82ae0e5588374bbbcf4fa6e4959fa174; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 733a35c00ef363a1c774d7ea486e0735b7c13a15; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 82bf8e7271fade40184177cb406203addc34c4a0; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 337e36550788dbe03254f0593a231c1c4873b20d; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 9c96238fac045b289993d7bc5aae7b2d72b25c76; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< efb54ec548829e1d3605f0434526f86e345b1b28; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 2c5e26a626fe46675bceba853e12aaf13c712e10; \>= 2cd9888590c52ac7592e3607d0a3174ccd57ef86, \< 863e0d81b6683c4cbc588ad831f560c90e494bef; Linux 2.6.17.

### Is there a fix for CVE-2022-49337?

Yes. Fixed in Linux 1434cd71ad9f3a6beda3036972983b6c4869207c, Linux 02480e2e82ae0e5588374bbbcf4fa6e4959fa174, Linux 733a35c00ef363a1c774d7ea486e0735b7c13a15, Linux 82bf8e7271fade40184177cb406203addc34c4a0, Linux 337e36550788dbe03254f0593a231c1c4873b20d, Linux 9c96238fac045b289993d7bc5aae7b2d72b25c76, Linux 2c5e26a626fe46675bceba853e12aaf13c712e10, Linux 863e0d81b6683c4cbc588ad831f560c90e494bef. Upgrade Linux to 863e0d81b6683c4cbc588ad831f560c90e494bef or later.

### How do I check if I'm affected by CVE-2022-49337?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/1434cd71ad9f3a6beda3036972983b6c4869207c>
- patch: <https://git.kernel.org/stable/c/02480e2e82ae0e5588374bbbcf4fa6e4959fa174>
- patch: <https://git.kernel.org/stable/c/733a35c00ef363a1c774d7ea486e0735b7c13a15>
- patch: <https://git.kernel.org/stable/c/82bf8e7271fade40184177cb406203addc34c4a0>
- patch: <https://git.kernel.org/stable/c/337e36550788dbe03254f0593a231c1c4873b20d>
- patch: <https://git.kernel.org/stable/c/9c96238fac045b289993d7bc5aae7b2d72b25c76>
- patch: <https://git.kernel.org/stable/c/efb54ec548829e1d3605f0434526f86e345b1b28>
- patch: <https://git.kernel.org/stable/c/2c5e26a626fe46675bceba853e12aaf13c712e10>
- patch: <https://git.kernel.org/stable/c/863e0d81b6683c4cbc588ad831f560c90e494bef>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49337>

HTML: <https://flawdb.com/CVE-2022-49337> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49337>
