lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZMFZ1l6cEc7Qma7O@arm.com>
Date:   Wed, 26 Jul 2023 18:37:26 +0100
From:   Catalin Marinas <catalin.marinas@....com>
To:     Mark Brown <broonie@...nel.org>
Cc:     Will Deacon <will@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64/sme: Set new vector length before reallocating

On Wed, Jul 26, 2023 at 01:12:26PM +0100, Mark Brown wrote:
> As part of fixing the allocation of the buffer for SVE state when changing
> SME vector length we introduced an immediate reallocation of the SVE state,
> this is also done when changing the SVE vector length for consistency.
> Unfortunately this reallocation is done prior to writing the new vector
> length to the task struct, meaning the allocation is done with the old
> vector length and can lead to memory corruption due to an undersized buffer
> being used.
> 
> Move the update of the vector length before the allocation to ensure that
> the new vector length is taken into account.
> 
> For some reason this isn't triggering any problems when running tests on
> the arm64 fixes branch (even after repeated tries) but is triggering
> issues very often after merge into mainline.
> 
> Fixes: d4d5be94a878 ("arm64/fpsimd: Ensure SME storage is allocated after SVE VL changes")
> Signed-off-by: Mark Brown <broonie@...nel.org>

I'll add a cc stable here since the above commit was fixing code that
went in for 5.19.

-- 
Catalin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ