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  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:   Sun, 14 May 2017 15:54:00 +0200
From:   Manfred Spraul <>
To:     Kees Cook <>,
        Andrew Morton <>
Cc:     Davidlohr Bueso <>,
        Ingo Molnar <>,
        Peter Zijlstra <>,
        Fabian Frederick <>,
Subject: Re: [PATCH] ipc/sem: Avoid indexing past end of sem_array

Hi Kees,

On 05/09/2017 12:23 AM, Kees Cook wrote:
> This changes the struct + trailing data pattern to using a void * so that
> the end of sem_array is found without possibly indexing past the end which
> can upset some static analyzers. Mostly, this ends up avoiding a cast
> between different non-void types, which the future randstruct GCC plugin
> was warning about.
Two question:
- Would the attached patch work with the randstruct plugin as well?
   If we touch the code, then I would propose that we remove sem_base 

- ipc/util.h contains

 > #define ipc_rcu_to_struct(p)  ((void *)(p+1))

Does this trigger a warning with randstruct as well?
If we have to touch it, then I would remove it by merging struct 
kern_ipc_perm and struct ipc_rcu.

And, obviously:
Do you see any issues with the attached patch?

View attachment "0001-ipc-sem.c-remove-sem_base-embed-struct-sem.patch" of type "text/x-patch" (12759 bytes)

Powered by blists - more mailing lists