CVE-2022-49296
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
26/02/2025
Last modified:
01/10/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ceph: fix possible deadlock when holding Fwb to get inline_data<br />
<br />
1, mount with wsync.<br />
2, create a file with O_RDWR, and the request was sent to mds.0:<br />
<br />
ceph_atomic_open()--><br />
ceph_mdsc_do_request(openc)<br />
finish_open(file, dentry, ceph_open)--><br />
ceph_open()--><br />
ceph_init_file()--><br />
ceph_init_file_info()--><br />
ceph_uninline_data()--><br />
{<br />
...<br />
if (inline_version == 1 || /* initial version, no data */<br />
inline_version == CEPH_INLINE_NONE)<br />
goto out_unlock;<br />
...<br />
}<br />
<br />
The inline_version will be 1, which is the initial version for the<br />
new create file. And here the ci->i_inline_version will keep with 1,<br />
it&#39;s buggy.<br />
<br />
3, buffer write to the file immediately:<br />
<br />
ceph_write_iter()--><br />
ceph_get_caps(file, need=Fw, want=Fb, ...);<br />
generic_perform_write()--><br />
a_ops->write_begin()--><br />
ceph_write_begin()--><br />
netfs_write_begin()--><br />
netfs_begin_read()--><br />
netfs_rreq_submit_slice()--><br />
netfs_read_from_server()--><br />
rreq->netfs_ops->issue_read()--><br />
ceph_netfs_issue_read()--><br />
{<br />
...<br />
if (ci->i_inline_version != CEPH_INLINE_NONE &&<br />
ceph_netfs_issue_op_inline(subreq))<br />
return;<br />
...<br />
}<br />
ceph_put_cap_refs(ci, Fwb);<br />
<br />
The ceph_netfs_issue_op_inline() will send a getattr(Fsr) request to<br />
mds.1.<br />
<br />
4, then the mds.1 will request the rd lock for CInode::filelock from<br />
the auth mds.0, the mds.0 will do the CInode::filelock state transation<br />
from excl --> sync, but it need to revoke the Fxwb caps back from the<br />
clients.<br />
<br />
While the kernel client has aleady held the Fwb caps and waiting for<br />
the getattr(Fsr).<br />
<br />
It&#39;s deadlock!<br />
<br />
URL: https://tracker.ceph.com/issues/55377
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 2.6.34 (including) | 5.18.4 (excluding) |
To consult the complete list of CPE names with products and versions, see this page



