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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 18 Nov 2021 10:30:32 -0800
From:   Casey Schaufler <>
To:     Kees Cook <>
Cc:     Alexander Popov <>,
        Steven Rostedt <>,
        Linus Torvalds <>,
        Lukas Bulwahn <>,
        Jonathan Corbet <>,
        Paul McKenney <>,
        Andrew Morton <>,
        Thomas Gleixner <>,
        Peter Zijlstra <>,
        Joerg Roedel <>,
        Maciej Rozycki <>,
        Muchun Song <>,
        Viresh Kumar <>,
        Robin Murphy <>,
        Randy Dunlap <>,
        Lu Baolu <>,
        Petr Mladek <>,
        Luis Chamberlain <>, Wei Liu <>,
        John Ogness <>,
        Andy Shevchenko <>,
        Alexey Kardashevskiy <>,
        Christophe Leroy <>,
        Jann Horn <>,
        Greg Kroah-Hartman <>,
        Mark Rutland <>,
        Andy Lutomirski <>,
        Dave Hansen <>,
        Will Deacon <>,
        Ard Biesheuvel <>,
        Laura Abbott <>,
        David S Miller <>,
        Borislav Petkov <>, Arnd Bergmann <>,
        Andrew Scull <>,
        Marc Zyngier <>, Jessica Yu <>,
        Iurii Zaikin <>,
        Rasmus Villemoes <>,
        Wang Qing <>, Mel Gorman <>,
        Mauro Carvalho Chehab <>,
        Andrew Klychkov <>,
        Mathieu Chouquet-Stringer <>,
        Daniel Borkmann <>,
        Stephen Kitt <>, Stephen Boyd <>,
        Thomas Bogendoerfer <>,
        Mike Rapoport <>,
        Bjorn Andersson <>,
        Kernel Hardening <>,,
        "open list:DOCUMENTATION" <>,
        linux-arch <>,
        Linux Kernel Mailing List <>,
        linux-fsdevel <>,,,,, Shuah Khan <>,
        Casey Schaufler <>
Subject: Re: [PATCH v2 0/2] Introduce the pkill_on_warn parameter

On 11/18/2021 9:32 AM, Kees Cook wrote:
> On Tue, Nov 16, 2021 at 11:00:23AM -0800, Casey Schaufler wrote:
>> On 11/16/2021 10:41 AM, Kees Cook wrote:
>>> On Tue, Nov 16, 2021 at 12:12:16PM +0300, Alexander Popov wrote:
>>>> What if the Linux kernel had a LSM module responsible for error handling policy?
>>>> That would require adding LSM hooks to BUG*(), WARN*(), KERN_EMERG, etc.
>>>> In such LSM policy we can decide immediately how to react on the kernel error.
>>>> We can even decide depending on the subsystem and things like that.
>>> That would solve the "atomicity" issue the WARN tracepoint solution has,
>>> and it would allow for very flexible userspace policy.
>>> I actually wonder if the existing panic_on_* sites should serve as a
>>> guide for where to put the hooks. The current sysctls could be replaced
>>> by the hooks and a simple LSM.
>> Do you really want to make error handling a "security" issue?
>> If you add security_bug(), security_warn_on() and the like
>> you're begging that they be included in SELinux (AppArmor) policy.
>> BPF, too, come to think of it. Is that what you want?
> Yeah, that is what I was thinking. This would give the LSM a view into
> kernel state, which seems a reasonable thing to do. If system integrity
> is compromised, an LSM may want to stop trusting things.

How are you planning to communicate the security relevance of the
warning to the LSM? I don't think that __FILE__, __LINE__ or __func__
is great information to base security policy on. Nor is a backtrace.

> A dedicated error-handling LSM could be added for those hooks that
> implemented the existing default panic_on_* sysctls, and could expand on
> that logic for other actions.

I can see having an interface like LSM for choosing a bug/warn policy.
I worry about expanding the LSM hook list for a case where I would
hope no existing LSM would use them, and the new LSM doesn't use any
of the existing hooks.

Powered by blists - more mailing lists