{"id":"CVE-2024-26689","aliases":["CVE-2024-26689"],"related":[],"kind":"vulnerability","state":"published","title":"ceph: prevent use-after-free in encode_cap_msg()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nceph: prevent use-after-free in encode_cap_msg()\n\nIn fs/ceph/caps.c, in encode_cap_msg(), \"use after free\" error was\ncaught by KASAN at this line - 'ceph_buffer_get(arg->xattr_buf);'. This\nimplies before the refcount could be increment here, it was freed.\n\nIn same file, in \"handle_cap_grant()\" refcount is decremented by this\nline - 'ceph_buffer_put(ci->i_xattrs.blob);'. It appears that a race\noccurred and resource was freed by the latter line before the former\nline could increment it.\n\nencode_cap_msg() is called by __send_cap() and __send_cap() is called by\nceph_check_caps() after calling __prep_cap(). __prep_cap() is where\narg->xattr_buf is assigned to ci->i_xattrs.blob. This is the spot where\nthe refcount must be increased to prevent \"use after free\" error.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nceph: prevent use-after-free in encode_cap_msg()\n\nIn fs/ceph/caps.c, in encode_cap_msg(), \"use after free\" error was\ncaught by KASAN at this line - 'ceph_buffer_get(arg->xattr_buf);'. This\nimplies before the refcount could be increment here, it was freed.\n\nIn same file, in \"handle_cap_grant()\" refcount is decremented by this\nline - 'ceph_buffer_put(ci->i_xattrs.blob);'. It appears that a race\noccurred and resource was freed by the latter line before the former\nline could increment it.\n\nencode_cap_msg() is called by __send_cap() and __send_cap() is called by\nceph_check_caps() after calling __prep_cap(). __prep_cap() is where\narg->xattr_buf is assigned to ci->i_xattrs.blob. This is the spot where\nthe refcount must be increased to prevent \"use after free\" error.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ceph: evita el use-after-free en encode_cap_msg() En fs/ceph/caps.c, en encode_cap_msg(), KASAN detectó el error \"use after free\" en este línea - 'ceph_buffer_get(arg-&gt;xattr_buf);'. Esto implica que antes de que el recuento pudiera incrementarse aquí, fue liberado. En el mismo archivo, en \"handle_cap_grant()\", el refcount se reduce en esta línea: 'ceph_buffer_put(ci-&gt;i_xattrs.blob);'. Parece que se produjo una ejecución y la última línea liberó el recurso antes de que la primera línea pudiera incrementarlo. __send_cap() llama a encode_cap_msg() y ceph_check_caps() llama a __send_cap() después de llamar a __prep_cap(). __prep_cap() es donde arg-&gt;xattr_buf se asigna a ci-&gt;i_xattrs.blob. Este es el punto donde se debe aumentar el recuento para evitar el error \"use after free\".","source":"nvd"}],"published":"2024-04-03T14:54:50.885Z","modified":"2026-08-05T11:26:42.116Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"9030aaf9bf0a1eee47a154c316c789e959638b0f","fixed":"8180d0c27b93a6eb60da1b08ea079e3926328214","status":"affected"},{"type":"git","introduced":"9030aaf9bf0a1eee47a154c316c789e959638b0f","fixed":"70e329b440762390258a6fe8c0de93c9fdd56c77","status":"affected"},{"type":"git","introduced":"9030aaf9bf0a1eee47a154c316c789e959638b0f","fixed":"f3f98d7d84b31828004545e29fd7262b9f444139","status":"affected"},{"type":"git","introduced":"9030aaf9bf0a1eee47a154c316c789e959638b0f","fixed":"ae20db45e482303a20e56f2db667a9d9c54ac7e7","status":"affected"},{"type":"git","introduced":"9030aaf9bf0a1eee47a154c316c789e959638b0f","fixed":"7958c1bf5b03c6f1f58e724dbdec93f8f60b96fc","status":"affected"},{"type":"git","introduced":"9030aaf9bf0a1eee47a154c316c789e959638b0f","fixed":"cda4672da1c26835dcbd7aec2bfed954eda9b5ef","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.34","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.34","status":"unaffected"},{"type":"semver","introduced":"5.10.210","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.149","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.79","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.18","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.7.6","lastAffected":"6.7.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.8","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","fixed":"5.10.210"},{"status":"affected","introduced":"5.11","fixed":"5.15.149"},{"status":"affected","introduced":"5.16","fixed":"6.1.79"},{"status":"affected","introduced":"6.2","fixed":"6.6.18"},{"status":"affected","introduced":"6.7","fixed":"6.7.6"},{"status":"affected","version":"6.8"},{"status":"affected","version":"6.8"},{"status":"affected","version":"6.8"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/8180d0c27b93a6eb60da1b08ea079e3926328214","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/70e329b440762390258a6fe8c0de93c9fdd56c77","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f3f98d7d84b31828004545e29fd7262b9f444139","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ae20db45e482303a20e56f2db667a9d9c54ac7e7","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7958c1bf5b03c6f1f58e724dbdec93f8f60b96fc","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cda4672da1c26835dcbd7aec2bfed954eda9b5ef","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-08-15T19:26:55.316Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-26689","url":"https://www.cve.org/CVERecord?id=CVE-2024-26689","licence":"CVE Terms of Use","modified":"2026-08-05T11:26:42.116Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-26689","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26689","licence":"Public domain","modified":"2026-08-04T11:16:56.117Z"}],"updatedAt":"2026-11-25T22:58:38.510Z","epss":{"score":0.00702,"percentile":0.54489,"date":"2026-12-01T12:00:22.000Z"}}