title: arm64/sme: Always exit sme_alloc() early with existing storage
description: In the Linux kernel, the following vulnerability has been resolved:
arm64/sme: Always exit sme_alloc() early with existing storage
When sme_alloc() is called with existing storage and we are not flushing we
will always allocate new storage, both leaking the existing storage and
corrupting the state. Fix this by separating the checks for flushing and
for existing storage as we do for SVE.
Callers that reallocate (eg, due to changing the vector length) should
call sme_free() themselves.
affected:
{
product: Linux
vendor: Linux
defaultStatus: unaffected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 5d0a8d2fba50, lessThan: 569156e4fa34, status: affected, versionType: git
version: 5d0a8d2fba50, lessThan: 814af6b4e600, status: affected, versionType: git
version: 5d0a8d2fba50, lessThan: dc7eb8755797, status: affected, versionType: git
}
{
product: Linux
vendor: Linux
defaultStatus: affected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 6.5, status: affected
version: 0, lessThan: 6.5, status: unaffected, versionType: custom
version: 6.6.15, lessThanOrEqual: 6.6.*, status: unaffected, versionType: custom
version: 6.7.3, lessThanOrEqual: 6.7.*, status: unaffected, versionType: custom
version: 6.8, lessThanOrEqual: *, status: unaffected, versionType: original_commit_for_fix
}
