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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e85d8503-b149-b90f-7737-684e8122d95b@virtuozzo.com>
Date:   Mon, 4 Dec 2017 20:09:25 +0300
From:   Andrey Ryabinin <aryabinin@...tuozzo.com>
To:     Christoph Hellwig <hch@...radead.org>,
        Paul Lawrence <paullawrence@...gle.com>
Cc:     Alexander Potapenko <glider@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        linux-kernel@...r.kernel.org, kasan-dev@...glegroups.com,
        linux-mm@...ck.org, linux-kbuild@...r.kernel.org,
        Matthias Kaehlcke <mka@...omium.org>,
        Michael Davidson <md@...gle.com>,
        Greg Hackmann <ghackmann@...gle.com>
Subject: Re: [PATCH v3 3/5] kasan: support alloca() poisoning



On 12/04/2017 07:55 PM, Andrey Ryabinin wrote:
> 
> 
> On 12/04/2017 07:42 PM, Christoph Hellwig wrote:
>> I don't think we are using alloca in kernel mode code, and we shouldn't.
>> What do I miss?  Is this hidden support for on-stack VLAs?  I thought
>> we'd get rid of them as well.
>>
> 
> Yes, this is for on-stack VLA. Last time I checked, we still had a few.
> 

E.g. building with -Wvla:


/home/andrew/linux/sound/core/pcm_native.c: In function ‘constrain_params_by_rules’:
/home/andrew/linux/sound/core/pcm_native.c:326:2: warning: ISO C90 forbids variable length array ‘rstamps’ [-Wvla]
  unsigned int rstamps[constrs->rules_num];
  ^~~~~~~~
In file included from /home/andrew/linux/crypto/cbc.c:14:0:
/home/andrew/linux/include/crypto/cbc.h: In function ‘crypto_cbc_decrypt_inplace’:
/home/andrew/linux/include/crypto/cbc.h:116:2: warning: ISO C90 forbids variable length array ‘last_iv’ [-Wvla]
  u8 last_iv[bsize];
  ^~
/home/andrew/linux/crypto/pcbc.c: In function ‘crypto_pcbc_encrypt_inplace’:
/home/andrew/linux/crypto/pcbc.c:75:2: warning: ISO C90 forbids variable length array ‘tmpbuf’ [-Wvla]
  u8 tmpbuf[bsize];
  ^~
/home/andrew/linux/crypto/pcbc.c: In function ‘crypto_pcbc_decrypt_inplace’:
/home/andrew/linux/crypto/pcbc.c:147:2: warning: ISO C90 forbids variable length array ‘tmpbuf’ [-Wvla]
  u8 tmpbuf[bsize] __aligned(__alignof__(u32));
  ^~
/home/andrew/linux/crypto/cts.c: In function ‘cts_cbc_encrypt’:
/home/andrew/linux/crypto/cts.c:107:2: warning: ISO C90 forbids variable length array ‘d’ [-Wvla]
  u8 d[bsize * 2] __aligned(__alignof__(u32));
  ^~
/home/andrew/linux/crypto/cts.c: In function ‘cts_cbc_decrypt’:
/home/andrew/linux/crypto/cts.c:186:2: warning: ISO C90 forbids variable length array ‘d’ [-Wvla]
  u8 d[bsize * 2] __aligned(__alignof__(u32));
  ^~
/home/andrew/linux/crypto/ctr.c: In function ‘crypto_ctr_crypt_final’:
/home/andrew/linux/crypto/ctr.c:61:2: warning: ISO C90 forbids variable length array ‘tmp’ [-Wvla]
  u8 tmp[bsize + alignmask];
  ^~
/home/andrew/linux/crypto/ctr.c: In function ‘crypto_ctr_crypt_inplace’:
/home/andrew/linux/crypto/ctr.c:109:2: warning: ISO C90 forbids variable length array ‘tmp’ [-Wvla]
  u8 tmp[bsize + alignmask];

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ