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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230527005539.5b06df24@mocarz>
Date:   Sat, 27 May 2023 00:55:39 +0200
From:   Aleksander Mazur <deweloper@...pl>
To:     Arnd Bergmann <arnd@...db.de>,
        Sergey Senozhatsky <senozhatsky@...omium.org>
Cc:     linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH] /proc/modules: honor kptr_restrict even without
 CONFIG_KALLSYMS

Hi,

Have you had a chance to review my patch?

-- 

Dnia 2022-06-05, o godz. 22:43:47
Aleksander Mazur <deweloper@...pl> napisaƂ(a):

> Commit e4a8ca3baa55 fixed building without CONFIG_KALLSYMS by providing
> dummy kallsyms_show_value(). Unfortunately -- due to hard-coded "false"
> being returned -- access to addresses in /proc/modules became permanently
> disabled.
> 
> My proposal is to change this unconditional "false" to !kptr_restrict.
> This re-enables addresses in /proc/modules even without CONFIG_KALLSYSMS
> unless restricted by means of sysctl (kernel.kptr_restrict).
> 
> Fixes: e4a8ca3baa55 ("/proc/module: fix building without kallsyms")
> Signed-off-by: Aleksander Mazur <deweloper@...pl>
> ---
>  include/linux/kallsyms.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
> index ad39636e0c3f..cf64f9709f46 100644
> --- a/include/linux/kallsyms.h
> +++ b/include/linux/kallsyms.h
> @@ -160,7 +160,7 @@ static inline int lookup_symbol_attrs(unsigned long addr,
> unsigned long *size, u 
>  static inline bool kallsyms_show_value(const struct cred *cred)
>  {
> -	return false;
> +	return !kptr_restrict;
>  }
>  
>  static inline int kallsyms_on_each_symbol(int (*fn)(void *, const char *,
> struct module *,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ