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: <17157.1533304170@warthog.procyon.org.uk>
Date:   Fri, 03 Aug 2018 14:49:30 +0100
From:   David Howells <dhowells@...hat.com>
To:     Tomas Bortoli <tomasbortoli@...il.com>
Cc:     dhowells@...hat.com, linux-cachefs@...hat.com,
        linux-kernel@...r.kernel.org, syzkaller@...glegroups.com
Subject: Re: [PATCH] fscache: fscache_set_key() - align alloc and usage

Tomas Bortoli <tomasbortoli@...il.com> wrote:

> The fscache_set_key() function allocates the buf pointer if index_key_len >
> sizeof(cookie->inline_key).  In such cases the allocated space might not be
> aligned with the pointer type.  This may result in an out-of-bound in the
> for-loop later in the same function, as the counter is rounded up.

Yeah, it's good idea anyway since I should tell the allocator everything that
I expect to use - though kmalloc() will effectively rounds up the size to a
multiple of 8 anyway (ie. the smallest allocation granule is 8 bytes).

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ