CVE-2022-49274: ocfs2: fix crash when mount with quota enabled
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: fix crash when mount with quota enabled
There is a reported crash when mounting ocfs2 with quota enabled.
RIP: 0010:ocfs2qinfolockresinit+0x44/0x50 [ocfs2] Call Trace: ocfs2localreadinfo+0xb9/0x6f0 [ocfs2] dquotloadquotasb+0x216/0x470 dquotloadquotainode+0x85/0x100 ocfs2enablequotas+0xa0/0x1c0 [ocfs2] ocfs2fillsuper.cold+0xc8/0x1bf [ocfs2] mountbdev+0x185/0x1b0 legacygettree+0x27/0x40 vfsgettree+0x25/0xb0 pathmount+0x465/0xac0 x64sysmount+0x103/0x140
It is caused by when initializing dqigqlock, the corresponding dqitype and dqisb are not properly initialized.
This issue is introduced by commit 6c85c2c72819, which wants to avoid accessing uninitialized variables in error cases. So make global quota info properly initialized.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.17.3-1
Event History
Frequently Asked Questions
Which systems are exposed to this crash?
Systems mounting an OCFS2 filesystem with quotas enabled are exposed. The failure occurs during the mount path while OCFS2 loads quota information.
What is required to trigger the issue?
A local mount operation is required, with OCFS2 quotas enabled. The supplied severity vector indicates no privileges are required but user interaction is required; no remote attack path is described.
What is the impact if the issue is triggered?
The reported outcome is a kernel crash during the OCFS2 mount operation. The crash is caused by global quota lock initialization using quota type and superblock fields that were not properly initialized.
What can be done if the fix cannot be applied immediately?
Avoid mounting OCFS2 filesystems with quotas enabled until the relevant kernel fix is available. This prevents the vulnerable quota-initialization path from being exercised.