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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 21 May 2015 06:34:16 +0000 (GMT)
From:	Maninder Singh <maninder1.s@...sung.com>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"oleg@...hat.com" <oleg@...hat.com>,
	"mhocko@...e.cz" <mhocko@...e.cz>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"riel@...hat.com" <riel@...hat.com>,
	"ionut.m.alexa@...il.com" <ionut.m.alexa@...il.com>,
	"peter@...leysoftware.com" <peter@...leysoftware.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Vaneet Narang <v.narang@...sung.com>,
	AKHILESH KUMAR <akhilesh.k@...sung.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [EDT][PATCH] kernel/exit.c : Fix missing read_unlock

EP-F6AA0618C49C4AEDA73BFF1B39950BAB
>> Hi,
>> 
>> From: Maninder Singh <maninder1.s@...sung.com>
>> 
>> Subject: [PATCH 1/1] kernel/exit.c : Fix missing task_unlock
>> 
     Subject: [PATCH 1/1] kernel/exit.c : Fix missing read_unlock
     
>> This patch adds missing read_unlock if do_wait_thread or ptrace_do_wait 
>> returns non zero.

      Reported By Prevent Under Missing unlock category(program hangs):-
      missing_unlock: returning without unlocking tasklist_lock
>> 
>> Signed-off-by: Maninder Singh <maninder1.s@...sung.com>
>> Signed-off-by: Vaneet Narang <v.narang@...sung.com>
>> Reviewd-by: Akhilesh Kumar <akhilesh.k@...sung.com>
>> ---
>>  kernel/exit.c |    8 ++++++--
>>  1 files changed, 6 insertions(+), 2 deletions(-)
>> 
>> diff --git a/kernel/exit.c b/kernel/exit.c
>> index 22fcc05..31a061f 100644
>> --- a/kernel/exit.c
>> +++ b/kernel/exit.c
>> @@ -1486,12 +1486,16 @@ repeat:
>>  	tsk = current;
>>  	do {
>>  		retval = do_wait_thread(wo, tsk);
>> -		if (retval)
>> +		if (retval) {
>> +			read_unlock(&tasklist_lock);
>>  			goto end;
>> +		}
>>  
>>  		retval = ptrace_do_wait(wo, tsk);
>> -		if (retval)
>> +		if (retval) {
>> +			read_unlock(&tasklist_lock);
>>  			goto end;
>> +		}
>>  
>>  		if (wo->wo_flags & __WNOTHREAD)
>>  			break;
>
>That's surprising and the changelog is lacking.

>So the last time that code was touched upstream was 7 years ago:

> commit 64a16caf5e3417ee32f670debcb5857b02a9e08e
> Author: Oleg Nesterov <oleg@...hat.com>
> Date:   Wed Jun 17 16:27:40 2009 -0700

>    do_wait: simplify retval/tsk_result/notask_error mess

>please explain whether what you fix is:

>  1) an ancient bug that somehow nobody ever triggered (plus analysis 
>     of why it wasn't triggered)

>  2) a new bug introduced by commit XYZ (plus analysis)

>  3) something else

This issue is reported by Prevent Under category Missing Unlock, So we think it should be reported to maintainers.

>Thanks,
>	Ingo

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ