{"id":"CVE-2022-49296","aliases":["CVE-2022-49296"],"related":[],"kind":"vulnerability","state":"published","title":"ceph: fix possible deadlock when holding Fwb to get inline_data","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nceph: fix possible deadlock when holding Fwb to get inline_data\n\n1, mount with wsync.\n2, create a file with O_RDWR, and the request was sent to mds.0:\n\n   ceph_atomic_open()-->\n     ceph_mdsc_do_request(openc)\n     finish_open(file, dentry, ceph_open)-->\n       ceph_open()-->\n         ceph_init_file()-->\n           ceph_init_file_info()-->\n             ceph_uninline_data()-->\n             {\n               ...\n               if (inline_version == 1 || /* initial version, no data */\n                   inline_version == CEPH_INLINE_NONE)\n                     goto out_unlock;\n               ...\n             }\n\nThe inline_version will be 1, which is the initial version for the\nnew create file. And here the ci->i_inline_version will keep with 1,\nit's buggy.\n\n3, buffer write to the file immediately:\n\n   ceph_write_iter()-->\n     ceph_get_caps(file, need=Fw, want=Fb, ...);\n     generic_perform_write()-->\n       a_ops->write_begin()-->\n         ceph_write_begin()-->\n           netfs_write_begin()-->\n             netfs_begin_read()-->\n               netfs_rreq_submit_slice()-->\n                 netfs_read_from_server()-->\n                   rreq->netfs_ops->issue_read()-->\n                     ceph_netfs_issue_read()-->\n                     {\n                       ...\n                       if (ci->i_inline_version != CEPH_INLINE_NONE &&\n                           ceph_netfs_issue_op_inline(subreq))\n                         return;\n                       ...\n                     }\n     ceph_put_cap_refs(ci, Fwb);\n\nThe ceph_netfs_issue_op_inline() will send a getattr(Fsr) request to\nmds.1.\n\n4, then the mds.1 will request the rd lock for CInode::filelock from\nthe auth mds.0, the mds.0 will do the CInode::filelock state transation\nfrom excl --> sync, but it need to revoke the Fxwb caps back from the\nclients.\n\nWhile the kernel client has aleady held the Fwb caps and waiting for\nthe getattr(Fsr).\n\nIt's deadlock!\n\nURL: https://tracker.ceph.com/issues/55377","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nceph: fix possible deadlock when holding Fwb to get inline_data\n\n1, mount with wsync.\n2, create a file with O_RDWR, and the request was sent to mds.0:\n\n   ceph_atomic_open()-->\n     ceph_mdsc_do_request(openc)\n     finish_open(file, dentry, ceph_open)-->\n       ceph_open()-->\n         ceph_init_file()-->\n           ceph_init_file_info()-->\n             ceph_uninline_data()-->\n             {\n               ...\n               if (inline_version == 1 || /* initial version, no data */\n                   inline_version == CEPH_INLINE_NONE)\n                     goto out_unlock;\n               ...\n             }\n\nThe inline_version will be 1, which is the initial version for the\nnew create file. And here the ci->i_inline_version will keep with 1,\nit's buggy.\n\n3, buffer write to the file immediately:\n\n   ceph_write_iter()-->\n     ceph_get_caps(file, need=Fw, want=Fb, ...);\n     generic_perform_write()-->\n       a_ops->write_begin()-->\n         ceph_write_begin()-->\n           netfs_write_begin()-->\n             netfs_begin_read()-->\n               netfs_rreq_submit_slice()-->\n                 netfs_read_from_server()-->\n                   rreq->netfs_ops->issue_read()-->\n                     ceph_netfs_issue_read()-->\n                     {\n                       ...\n                       if (ci->i_inline_version != CEPH_INLINE_NONE &&\n                           ceph_netfs_issue_op_inline(subreq))\n                         return;\n                       ...\n                     }\n     ceph_put_cap_refs(ci, Fwb);\n\nThe ceph_netfs_issue_op_inline() will send a getattr(Fsr) request to\nmds.1.\n\n4, then the mds.1 will request the rd lock for CInode::filelock from\nthe auth mds.0, the mds.0 will do the CInode::filelock state transation\nfrom excl --> sync, but it need to revoke the Fxwb caps back from the\nclients.\n\nWhile the kernel client has aleady held the Fwb caps and waiting for\nthe getattr(Fsr).\n\nIt's deadlock!\n\nURL: https://tracker.ceph.com/issues/55377","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ceph: se corrige un posible bloqueo al mantener presionado Fwb para obtener inline_data 1, montar con wsync. 2, crear un archivo con O_RDWR y la solicitud se envió a mds.0: ceph_atomic_open()--&gt; ceph_mdsc_do_request(openc) finish_open(file, dentry, ceph_open)--&gt; ceph_open()--&gt; ceph_init_file()--&gt; ceph_init_file_info()--&gt; ceph_uninline_data()--&gt; { ... if (inline_version == 1 || /* versión inicial, sin datos */ inline_version == CEPH_INLINE_NONE) goto out_unlock; ... } La inline_version será 1, que es la versión inicial para el nuevo archivo de creación. Y aquí, ci-&gt;i_inline_version se mantendrá con 1, es un error. 3, escribe en el búfer inmediatamente en el archivo: ceph_write_iter()--&gt; ceph_get_caps(archivo, necesidad=Fw, deseo=Fb, ...); generic_perform_write()--&gt; a_ops-&gt;write_begin()--&gt; ceph_write_begin()--&gt; netfs_write_begin()--&gt; netfs_begin_read()--&gt; netfs_rreq_submit_slice()--&gt; netfs_read_from_server()--&gt; rreq-&gt;netfs_ops-&gt;issue_read()--&gt; ceph_netfs_issue_read()--&gt; { ... if (ci-&gt;i_inline_version != CEPH_INLINE_NONE &amp;&amp; ceph_netfs_issue_op_inline(subreq)) return; ... } ceph_put_cap_refs(ci, Fwb); El ceph_netfs_issue_op_inline() enviará una solicitud getattr(Fsr) a mds.1.4, luego mds.1 solicitará el bloqueo de rd para CInode::filelock desde el mds.0 de autenticación, el mds.0 realizará la transacción de estado de CInode::filelock desde excl --&gt; sync, pero necesita revocar las capacidades Fxwb de los clientes. Mientras que el cliente del kernel ya ha retenido las capacidades Fwb y está esperando el getattr(Fsr). ¡Está en un punto muerto! URL: https://tracker.ceph.com/issues/55377","source":"nvd"}],"published":"2025-02-26T02:01:26.131Z","modified":"2026-08-13T00:17:31.190Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"083db6fd3e73fc4f9ee74d2da1012a94216d6a60","fixed":"292b7a7275ce535a1abfa4dd0b2e586162aaae1e","status":"affected"},{"type":"git","introduced":"083db6fd3e73fc4f9ee74d2da1012a94216d6a60","fixed":"825978fd6a0defc3c29d8a38b6cea76a0938d21e","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.18","status":"unaffected"},{"type":"semver","introduced":"5.18.4","lastAffected":"5.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"2.6.34","fixed":"5.18.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/292b7a7275ce535a1abfa4dd0b2e586162aaae1e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/825978fd6a0defc3c29d8a38b6cea76a0938d21e","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-10-01T19:44:59.503Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49296","url":"https://www.cve.org/CVERecord?id=CVE-2022-49296","licence":"CVE Terms of Use","modified":"2026-08-12T23:58:22.125Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49296","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49296","licence":"Public domain","modified":"2026-08-13T00:17:31.190Z"}],"updatedAt":"2026-11-25T22:58:20.372Z","epss":{"score":0.0017,"percentile":0.06637,"date":"2026-12-01T12:00:22.000Z"}}