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]
Date:   Fri, 27 Oct 2017 11:02:39 -0700
From:   David Daney <ddaney@...iumnetworks.com>
To:     Abderrahmane Benbachir <abderrahmane.benbachir@...ymtl.ca>,
        linux-kernel@...r.kernel.org
Cc:     mingo@...nel.org, akpm@...ux-foundation.org, tglx@...utronix.de,
        keescook@...omium.org, jeyu@...hat.com, rostedt@...dmis.org,
        mhocko@...e.com, viresh.kumar@...aro.org, thomas.lendacky@....com
Subject: Re: [PATCH] init/main.c: check for null pointer before calling
 initcall

On 10/27/2017 09:47 AM, Abderrahmane Benbachir wrote:
> Simple check to prevent kernel panic when initcall does not exit

Interesting, under what circumstances do you observe the panic?

It would be best to include this information in the patch changelog.


> 
> Signed-off-by: Abderrahmane Benbachir <abderrahmane.benbachir@...ymtl.ca>
> ---
>   init/main.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/init/main.c b/init/main.c
> index 0ee9c6866ada..220fd2822b61 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -817,6 +817,9 @@ int __init_or_module do_one_initcall(initcall_t fn)
>   	int ret;
>   	char msgbuf[64];
>   
> +	if (unlikely(!fn))
> +		return -EFAULT;
> +
>   	if (initcall_blacklisted(fn))
>   		return -EPERM;
>   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ