{"id":"CVE-2024-26689","published":"2024-04-03T14:54:50Z","modified":"2026-08-05T11:26:42Z","title":"ceph: prevent use-after-free in encode_cap_msg()","vendor":"Linux","product":"Linux","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00702,"percentile":0.54153,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/8180d0c27b93a6eb60da1b08ea079e3926328214","tags":[]},{"url":"https://git.kernel.org/stable/c/70e329b440762390258a6fe8c0de93c9fdd56c77","tags":[]},{"url":"https://git.kernel.org/stable/c/f3f98d7d84b31828004545e29fd7262b9f444139","tags":[]},{"url":"https://git.kernel.org/stable/c/ae20db45e482303a20e56f2db667a9d9c54ac7e7","tags":[]},{"url":"https://git.kernel.org/stable/c/7958c1bf5b03c6f1f58e724dbdec93f8f60b96fc","tags":[]},{"url":"https://git.kernel.org/stable/c/cda4672da1c26835dcbd7aec2bfed954eda9b5ef","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["x_transferred"]}],"priority":{"score":17.0,"factors":[{"name":"EPSS percentile","points":10.83},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 9030aaf9bf0a1eee47a154c316c789e959638b0f, < 8180d0c27b93a6eb60da1b08ea079e3926328214",">= 9030aaf9bf0a1eee47a154c316c789e959638b0f, < 70e329b440762390258a6fe8c0de93c9fdd56c77",">= 9030aaf9bf0a1eee47a154c316c789e959638b0f, < f3f98d7d84b31828004545e29fd7262b9f444139",">= 9030aaf9bf0a1eee47a154c316c789e959638b0f, < ae20db45e482303a20e56f2db667a9d9c54ac7e7",">= 9030aaf9bf0a1eee47a154c316c789e959638b0f, < 7958c1bf5b03c6f1f58e724dbdec93f8f60b96fc",">= 9030aaf9bf0a1eee47a154c316c789e959638b0f, < cda4672da1c26835dcbd7aec2bfed954eda9b5ef"]},{"vendor":"Linux","product":"Linux","versions":["2.6.34"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-08-15T19:26:55.316031Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-23951","exploited":false,"provenance":"source"}}