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:   Wed, 18 Jan 2017 15:27:55 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     Jan-Benedict Glaw <jbglaw@...-owl.de>, linux-alpha@...r.kernel.org
Cc:     Al Viro <viro@...iv.linux.org.uk>,
        Ivan Kokshaysky <ink@...assic.park.msu.ru>,
        Matt Turner <mattst88@...il.com>,
        Nicolas Pitre <nicolas.pitre@...aro.org>,
        Richard Cochran <richardcochran@...il.com>,
        Richard Henderson <rth@...ddle.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 4/4] alpha: Move two assignments for the variable "res" in
 srm_env_proc_write()

>> A local variable was set to an error code in two cases before a concrete
>> error situation was detected. Thus move the corresponding assignment into
>> an if branch to indicate a software failure there.
>>
>> This issue was detected by using the Coccinelle software.
>>
>> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> Acked-by: Jan-Benedict Glaw <jbglaw@...-owl.de>

Thanks for your positive feedback.


Unfortunately, I have got the impression that this update step is inappropriate
so far because the suggested change for the handling of the error code “-EFAULT”
can be incomplete (or a bit too much).

Which implementation would you prefer?

A) Keep the variable assignment before the check for the call of
   the function “copy_from_user”

B) Add an assignment in another condition branch at the end.

 		res = (int) ret1;
+	} else {
+		res = -EFAULT;
 	}

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ