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]
Date:   Mon, 23 Apr 2018 12:33:17 +0200
From:   Jan Kiszka <jan.kiszka@....de>
To:     Mark Rutland <mark.rutland@....com>
Cc:     linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        will.deacon@....com, catalin.marinas@....com,
        suzuki.poulose@....com
Subject: Re: BUG: KASAN: global-out-of-bounds in
 unmap_kernel_at_el0+0x70/0x1a0

On 2018-04-23 12:29, Mark Rutland wrote:
> On Mon, Apr 23, 2018 at 07:00:52AM +0200, Jan Kiszka wrote:
>> On 2018-04-22 21:06, Mark Rutland wrote:
> 
>>> Does the below help?
> 
>>> From ade322407e3d6d1f50e558ebd50d2c1c7bd811c2 Mon Sep 17 00:00:00 2001
>>> From: Mark Rutland <mark.rutland@....com>
>>> Date: Sun, 22 Apr 2018 19:58:08 +0100
>>> Subject: [PATCH] arm64: add sentinel to kpti_safe_list
>>>
>>> We're missing a sentinel entry in kpti_safe_list. Thus is_midr_in_range_list()
>>> can walk past the end of kpti_safe_list. Depending on the contents of memory,
>>> this could erroneously match a CPU's MIDR, cause a data abort, or other bad
>>> outcomes.
>>>
>>> Add the sentinel entry to avoid this.
>>>
>>> Fixes: be5b299830c63ed7 ("arm64: capabilities: Add support for checks based on a list of MIDRs")
>>> Signed-off-by: Mark Rutland <mark.rutland@....com>
>>> Reported-by: Jan Kiszka <jan.kiszka@....de>
>>> Cc: Catalin Marinas <catalin.marinas@....com>
>>> Cc: Suzuki K Poulose <suzuki.poulose@....com>
>>> Cc: Will Deacon <will.deacon@....com>
>>> ---
>>>  arch/arm64/kernel/cpufeature.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
>>> index 536d572e5596..9d1b06d67c53 100644
>>> --- a/arch/arm64/kernel/cpufeature.c
>>> +++ b/arch/arm64/kernel/cpufeature.c
>>> @@ -868,6 +868,7 @@ static bool unmap_kernel_at_el0(const struct arm64_cpu_capabilities *entry,
>>>  	static const struct midr_range kpti_safe_list[] = {
>>>  		MIDR_ALL_VERSIONS(MIDR_CAVIUM_THUNDERX2),
>>>  		MIDR_ALL_VERSIONS(MIDR_BRCM_VULCAN),
>>> +		{ /* sentinel */ }
>>>  	};
>>>  	char const *str = "command line option";
>>>  
>>>
>>
>> Jep, all fine now!
> 
> Cool. Can I take that as a Tested-by?

Yes, sorry:

Tested-by: Jan Kiszka <jan.kiszka@...mens.com>

Jan



Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ