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] [day] [month] [year] [list]
Date:   Tue, 26 Sep 2023 09:20:50 +0800
From:   Su Hui <suhui@...china.com>
To:     Dan Carpenter <dan.carpenter@...aro.org>
Cc:     sfrench@...ba.org, pc@...guebit.com, lsahlber@...hat.com,
        sprasad@...rosoft.com, tom@...pey.com, linux-cifs@...r.kernel.org,
        samba-technical@...ts.samba.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] cifs: avoid possible NULL dereference

On 2023/9/25 23:07, Dan Carpenter wrote:
> On Mon, Sep 25, 2023 at 12:52:21PM +0800, Su Hui wrote:
>> diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
>> index 2108b3b40ce9..37eed057ded0 100644
>> --- a/fs/smb/client/file.c
>> +++ b/fs/smb/client/file.c
>> @@ -4878,6 +4878,12 @@ void cifs_oplock_break(struct work_struct *work)
>>   	struct cifsFileInfo *cfile = container_of(work, struct cifsFileInfo,
>>   						  oplock_break);
>>   	struct inode *inode = d_inode(cfile->dentry);
>> +
>> +	if (!inode) {
>> +		cifs_dbg(FYI, "%s : failed to find inode\n", __func__);
>> +		return;
>> +	}
>> +
> Are we allowing this in the middle of the declaration block these days?
Really sorry for this, I will modify it right now.
Thanks for your reminder!

Su Hui

>
>>   	struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
>>   	struct cifsInodeInfo *cinode = CIFS_I(inode);
>>   	struct cifs_tcon *tcon;
>
> regards,
> dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ