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: <59355A43.7000706@huawei.com>
Date:   Mon, 5 Jun 2017 21:18:59 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     Michal Hocko <mhocko@...nel.org>
CC:     <akpm@...ux-foundation.org>, <oleg@...hat.com>, <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 2017/6/5 21:09, Michal Hocko wrote:
> On Mon 05-06-17 20:53:27, zhongjiang wrote:
>> diff --git a/kernel/signal.c b/kernel/signal.c
>> index ca92bcf..63148f7 100644
>> --- 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;
> this will obviously keep the tasklist_lock held...
 oh, it is my fault.   Thank you for clarify.

 Thanks
zhongjiang
>>  		ret = __kill_pgrp_info(sig, info,
>>  				pid ? find_vpid(-pid) : task_pgrp(current));
>>  	} else {
>> -- 
>> 1.7.12.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ