{"id":"CVE-2024-56681","state":"PUBLISHED","title":"crypto: bcm - add error check in the ahash_hmac_init function","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: bcm - add error check in the ahash_hmac_init function\n\nThe ahash_init functions may return fails. The ahash_hmac_init should\nnot return ok when ahash_init returns error. For an example, ahash_init\nwill return -ENOMEM when allocation memory is error.","publishedAt":"2024-12-28T09:46:09.675Z","updatedAt":"2026-10-15T21:51:48.722Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"8f1a9a960b1107bd0e0ec3736055f5ed0e717edf","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"75e1e38e5d80d6d9011b7322698ffba3dd3db30a","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"28f8ffa945f7d7150463e15097ea73b19529d6f5","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"4ea3e3b761e371102bb1486778e2f8dbc9e37413","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"05f0a3f5477ecaa1cf46448504afe9e7c2e96fcc","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"ae5253313e0ea5f00c06176074592b7f493c8546","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"ee36db8e8203420e6d5c42eb9428920c2fc36532","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"bba9e38c5ad41d0a88b22a59e5b6dd3e31825118","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"19630cf57233e845b6ac57c9c969a4888925467b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/bcm/cipher.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.11","versionType":"semver"},{"version":"4.19.325","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.287","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.231","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.174","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.120","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.64","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.11","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12.2","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/bcm/cipher.c"]}],"references":["https://git.kernel.org/stable/c/8f1a9a960b1107bd0e0ec3736055f5ed0e717edf","https://git.kernel.org/stable/c/75e1e38e5d80d6d9011b7322698ffba3dd3db30a","https://git.kernel.org/stable/c/28f8ffa945f7d7150463e15097ea73b19529d6f5","https://git.kernel.org/stable/c/4ea3e3b761e371102bb1486778e2f8dbc9e37413","https://git.kernel.org/stable/c/05f0a3f5477ecaa1cf46448504afe9e7c2e96fcc","https://git.kernel.org/stable/c/ae5253313e0ea5f00c06176074592b7f493c8546","https://git.kernel.org/stable/c/ee36db8e8203420e6d5c42eb9428920c2fc36532","https://git.kernel.org/stable/c/bba9e38c5ad41d0a88b22a59e5b6dd3e31825118","https://git.kernel.org/stable/c/19630cf57233e845b6ac57c9c969a4888925467b","https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html","https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:12.933Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/56xxx/CVE-2024-56681.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-56681","state":"PUBLISHED","datePublished":"2024-12-28T09:46:09.675Z","dateUpdated":"2026-10-15T21:51:48.722Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-27T15:00:39.846Z"},"containers":{"cna":{"title":"crypto: bcm - add error check in the ahash_hmac_init function","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: bcm - add error check in the ahash_hmac_init function\n\nThe ahash_init functions may return fails. The ahash_hmac_init should\nnot return ok when ahash_init returns error. For an example, ahash_init\nwill return -ENOMEM when allocation memory is error."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"8f1a9a960b1107bd0e0ec3736055f5ed0e717edf","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"75e1e38e5d80d6d9011b7322698ffba3dd3db30a","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"28f8ffa945f7d7150463e15097ea73b19529d6f5","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"4ea3e3b761e371102bb1486778e2f8dbc9e37413","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"05f0a3f5477ecaa1cf46448504afe9e7c2e96fcc","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"ae5253313e0ea5f00c06176074592b7f493c8546","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"ee36db8e8203420e6d5c42eb9428920c2fc36532","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"bba9e38c5ad41d0a88b22a59e5b6dd3e31825118","versionType":"git"},{"version":"9d12ba86f818aa9cfe9f01b750336aa441f2ffa2","status":"affected","lessThan":"19630cf57233e845b6ac57c9c969a4888925467b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/bcm/cipher.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.11","versionType":"semver"},{"version":"4.19.325","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.287","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.231","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.174","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.120","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.64","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.11","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12.2","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/bcm/cipher.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/8f1a9a960b1107bd0e0ec3736055f5ed0e717edf"},{"url":"https://git.kernel.org/stable/c/75e1e38e5d80d6d9011b7322698ffba3dd3db30a"},{"url":"https://git.kernel.org/stable/c/28f8ffa945f7d7150463e15097ea73b19529d6f5"},{"url":"https://git.kernel.org/stable/c/4ea3e3b761e371102bb1486778e2f8dbc9e37413"},{"url":"https://git.kernel.org/stable/c/05f0a3f5477ecaa1cf46448504afe9e7c2e96fcc"},{"url":"https://git.kernel.org/stable/c/ae5253313e0ea5f00c06176074592b7f493c8546"},{"url":"https://git.kernel.org/stable/c/ee36db8e8203420e6d5c42eb9428920c2fc36532"},{"url":"https://git.kernel.org/stable/c/bba9e38c5ad41d0a88b22a59e5b6dd3e31825118"},{"url":"https://git.kernel.org/stable/c/19630cf57233e845b6ac57c9c969a4888925467b"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The reliable trigger is a local unprivileged process driving the driver's ahash through AF_ALG (algif_hash) socket syscalls; in-kernel remote consumers of crypto_ahash_init() on hmac algorithms (tcp_ao, gss_krb5) would additionally require an allocation failure the remote peer cannot control.\nAC:L - The attacker sets a zero-length HMAC key via ALG_SET_KEY, which makes ahash_init() skip setkey and hit the deterministic -ENOKEY error path that frees ctx->shash without clearing it — no race, no memory pressure, and the freed object can be groomed between syscalls before the update() use.\nPR:L - Any unprivileged local user can open an AF_ALG hash socket and bind to the driver's algorithm/driver name (hmac-sha1-iproc); no capability check exists on this path.\nUI:N - The attacker performs the entire socket/setkey/sendmsg sequence itself; no victim action is involved.\nS:U - The corruption is confined to kernel heap memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The stale ctx->shash is dereferenced as a shash_desc, so an attacker who reclaims the freed slab object controls the tfm pointer and the resulting digest data returned to userspace, giving a use-after-free read primitive over kernel memory.\nI:H - crypto_shash_update()/final() perform an indirect call through a function-pointer table reached from the freed object, and ahash_final() then does crypto_free_shash(ctx->shash->tfm) plus kfree(ctx->shash) — a double free and a free of an attacker-supplied pointer, which is a control-flow-hijack/arbitrary-write primitive.\nA:H - In the -ENOMEM case ctx->shash is NULL and the subsequent crypto_shash_update()/final() dereference NULL, and in the -ENOKEY case the use-after-free and double free reliably oops or panic the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:46:02.716Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"4.19.325"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"5.4.287"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"5.10.231"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"5.15.174"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.1.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.6.64"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.11.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.12.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T20:52:28.536Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-56681","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:41:19.814800Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:51:48.722Z"}}]}}}