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, 4 Feb 2015 18:46:34 +0100
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Kiran Padwal <kiran.padwal21@...il.com>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: gdm724x: gdm_tty: Fix for possible null pointer dereference

2015-02-02 17:36 GMT+01:00 Sudip Mukherjee <sudipm.mukherjee@...il.com>:
> On Thu, Jan 29, 2015 at 07:46:10PM +0100, Rickard Strandqvist wrote:
>> Fix a possible null pointer dereference, there is
>> otherwise a risk of a possible null pointer dereference.
>>
>> This was found using a static code analysis program called cppcheck
>>
>> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
>> ---
>>  drivers/staging/gdm724x/gdm_tty.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
>> index 001348c..66b356e 100644
>> --- a/drivers/staging/gdm724x/gdm_tty.c
>> +++ b/drivers/staging/gdm724x/gdm_tty.c
>> @@ -145,7 +145,7 @@ static int gdm_tty_recv_complete(void *data,
>>       struct gdm *gdm = tty_dev->gdm[index];
>>
>>       if (!GDM_TTY_READY(gdm)) {
>> -             if (complete == RECV_PACKET_PROCESS_COMPLETE)
>> +             if (gdm && complete == RECV_PACKET_PROCESS_COMPLETE)
> GDM_TTY_READY() is already checking for gdm, there is no chance that gdm can be null at this point. so this additional check is not required.
>
> regards
> sudip
>>                       gdm_tty_recv(gdm, gdm_tty_recv_complete);
>>               return TO_HOST_PORT_CLOSE;
>>       }
>> --
>> 1.7.10.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@...r.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/


Hi Sudip

Yes, GDM_TTY_READY checks gdm, but this is a if(! )


Kind regards
Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ