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] [day] [month] [year] [list]
Date:   Wed, 11 Apr 2018 11:29:56 +0200 (CEST)
From:   Miroslav Benes <mbenes@...e.cz>
To:     Petr Mladek <pmladek@...e.com>
cc:     Jiri Kosina <jikos@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Joe Lawrence <joe.lawrence@...hat.com>,
        Jessica Yu <jeyu@...nel.org>, Nicolai Stange <nstange@...e.de>,
        live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] livepatch: Initialize shadow variables safely by
 a custom callback

On Thu, 5 Apr 2018, Petr Mladek wrote:

> The existing API allows to pass a sample data to initialize the shadow
> data. It works well when the data are position independent. But it fails
> miserably when we need to set a pointer to the shadow structure itself.
> 
> Unfortunately, we might need to initialize the pointer surprisingly
> often because of struct list_head. It is even worse because the list
> might be hidden in other common structures, for example, struct mutex,
> struct wait_queue_head.
> 
> For example, this was needed to fix races in ALSA sequncer. It required

s/sequncer/sequencer/

> to add mutex into struct snd_seq_client. See commit b3defb791b26ea06
> ("ALSA: seq: Make ioctls race-free") and commit d15d662e89fc667b9
> ("ALSA: seq: Fix racy pool initializations")
> 
> This patch makes the API more safe. A custom constructor function and data
> are passed to klp_shadow_*alloc() functions instead of the sample data.
> 
> Note that ctor_data are not longer a template for shadow->data. It might

s/not longer/no longer/

> point to any data that might be necessary when the constructor is called.

Miroslav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ