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: <20170605133159.GA10301@redhat.com>
Date:   Mon, 5 Jun 2017 15:31:59 +0200
From:   Oleg Nesterov <oleg@...hat.com>
To:     zhongjiang <zhongjiang@...wei.com>
Cc:     akpm@...ux-foundation.org, mhocko@...nel.org, vbabka@...e.cz,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        qiuxishi@...wei.com
Subject: Re: [PATCH v2] signal: Avoid undefined behaviour in
 kill_something_info

On 06/05, zhongjiang wrote:
>
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -1395,6 +1395,12 @@ static int kill_something_info(int sig, struct siginfo *info, pid_t pid)
>
>  	read_lock(&tasklist_lock);
>  	if (pid != -1) {
> +		/*
> +	 	 * -INT_MIN is undefined, it need to exclude following case to
> + 		 * avoid the UBSAN detection.
> +		 */
> +		if (pid == INT_MIN)
> +			return -ESRCH;

you need to do this before read_lock(tasklist)

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ