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:   Thu, 2 Feb 2017 13:50:31 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Petr Mladek <pmladek@...e.com>, Borislav Petkov <bp@...e.de>
Cc:     Rabin Vincent <rabin.vincent@...s.com>, akpm@...ux-foundation.org,
        linux-kernel@...r.kernel.org,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [PATCH] printk: fix printk.devkmsg sysctl

Hello,

sorry, catching up with the emails.

there seems to be two independent patches. I'll just comment in one
thread.



On (01/31/17 14:55), Petr Mladek wrote:
[..]
> From 0ce6125caf314270cb48202390d8a0938fdf316e Mon Sep 17 00:00:00 2001
> From: Petr Mladek <pmladek@...e.com>
> Date: Tue, 31 Jan 2017 12:00:13 +0100
> Subject: [PATCH] printk: Fix printk.devkmsg sysctl
> 
> The code handling write into /proc/sys/kernel/printk_devkmsg expects
> a new line at the end of the string but does not check it. As a result
> it allows:
> 
>  # echo -n offX > /proc/sys/kernel/printk_devkmsg
>  #
> 
> while at the same time it rejects legitimate uses:
> 
>  # echo -n off > /proc/sys/kernel/printk_devkmsg
>  -sh: echo: write error: Invalid argument
> 

for these cases (echo/echo -n/echo -e/etc. etc.) I usually use
sysfs_streq() from lib/string.c

wouldn't sysfs_streq() do the trick here?

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ