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:	Tue, 24 Dec 2013 10:08:52 +0100
From:	Ard Biesheuvel <ard.biesheuvel@...aro.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Michael Neuling <michael@...ling.org>,
	Nishanth Aravamudan <nacc@...ux.vnet.ibm.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	viro@...iv.linux.org.uk
Subject: Re: [PATCH] auxvec.h: account for AT_HWCAP2 in AT_VECTOR_SIZE_BASE

On 24 December 2013 02:37, Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> Please cc the guilty parties when sending patches like this.
>

OK.
[Added Al Viro as well as this affects fs/binfmt_elf.c]

> Also, just out of interest, please describe how this bug affected
> things. Did we overflow the saved_auxv[] array, or what?

That is the risk, yes. AT_VECTOR_SIZE_BASE is supposed to be an upper
bound for the number of generic auxv entries, and this is currently
not the case. However, I am not aware of any actual problems that have
been caused, and powerpc is indeed the only arch that defines
ELF_HWCAP2 at the moment. But I spotted this when working on a series
that adds ELF_HWCAP2 to ARM, and other archs may follow in the future.

> Also, how
> does this change affect architectures that _don't_ have that
> ELF_HWCAP2 thing, ie everything but powerpc?
>

Some wasted space (two longs) in saved_auxv[] in mm_struct.

-- 
Ard.



> Acks, people?
>
>            Linus
>
> On Mon, Dec 23, 2013 at 9:49 AM, Ard Biesheuvel
> <ard.biesheuvel@...aro.org> wrote:
>> Commit 2171364d1a92 (powerpc: Add HWCAP2 aux entry) introduced a new
>> AT_ auxv entry type AT_HWCAP2 but failed to update AT_VECTOR_SIZE_BASE
>> accordingly.
>>
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
>> Fixes: 2171364d1a92 (powerpc: Add HWCAP2 aux entry)
>> Cc: stable@...r.kernel.org
>> ---
>>
>>  include/linux/auxvec.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/auxvec.h b/include/linux/auxvec.h
>> index 669fef5..3e0fbe4 100644
>> --- a/include/linux/auxvec.h
>> +++ b/include/linux/auxvec.h
>> @@ -3,6 +3,6 @@
>>
>>  #include <uapi/linux/auxvec.h>
>>
>> -#define AT_VECTOR_SIZE_BASE 19 /* NEW_AUX_ENT entries in auxiliary table */
>> +#define AT_VECTOR_SIZE_BASE 20 /* NEW_AUX_ENT entries in auxiliary table */
>>    /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */
>>  #endif /* _LINUX_AUXVEC_H */
>> --
>> 1.8.3.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ