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]
Message-ID: <CAGXu5jLL_kzAaP2oF6rQ1n3kLV9DM-UzVtVf2gv+-ugJPED7NQ@mail.gmail.com>
Date:	Fri, 14 Nov 2014 12:06:55 -0800
From:	Kees Cook <keescook@...omium.org>
To:	Sebastian Schmidt <yath@...h.de>
Cc:	Anton Vorontsov <anton@...msg.org>,
	Colin Cross <ccross@...roid.com>,
	Tony Luck <tony.luck@...el.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	linux-next <linux-next@...r.kernel.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Jim Davis <jim.epost@...il.com>
Subject: Re: [PATCH] syslog: provide stub check_syslog_permissions

On Thu, Nov 13, 2014 at 9:22 PM, Sebastian Schmidt <yath@...h.de> wrote:
> When building without CONFIG_PRINTK, we need to provide a stub
> check_syslog_permissions. As there is no way to turn on the
> dmesg_restrict sysctl without CONFIG_PRINTK, return success.
>
> Reported-by: Jim Davis <jim.epost@...il.com>
> Signed-off-by: Sebastian Schmidt <yath@...h.de>

I think this is correct. Without CONFIG_PRINTK, dmesg_restrict doesn't
exist. It's a bit mind-bending, but since all the logic for
capabilities, etc, is also missing, I guess "allow" (return 0) is the
right default without printk.

Thanks!

Acked-by: Kees Cook <keescook@...omium.org>

-Kees

> ---
>  include/linux/syslog.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/syslog.h b/include/linux/syslog.h
> index 9def529..13c05d1 100644
> --- a/include/linux/syslog.h
> +++ b/include/linux/syslog.h
> @@ -48,6 +48,14 @@
>  #define SYSLOG_FROM_PROC             1
>
>  int do_syslog(int type, char __user *buf, int count, bool from_file);
> +
> +#ifdef CONFIG_PRINTK
>  int check_syslog_permissions(int type, bool from_file);
> +#else
> +static int check_syslog_permissions(int type, bool from_file)
> +{
> +       return 0;
> +}
> +#endif
>
>  #endif /* _LINUX_SYSLOG_H */
> --
> 2.1.1



-- 
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ