[PATCH] Avoid potential NULL pointer deref in SMB2_CLOSE debug

Günther Deschner gd at samba.org
Tue Dec 18 10:24:49 UTC 2018


Hi,

please review and push.

Thanks,
Guenther
-- 
Günther Deschner                    GPG-ID: 8EE11688
Red Hat                         gdeschner at redhat.com
Samba Team                              gd at samba.org
-------------- next part --------------
From e4e8d146238cd63331bbcc171ab236669d18b161 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd at samba.org>
Date: Tue, 18 Dec 2018 11:10:04 +0100
Subject: [PATCH] s3-smbd: avoid assuming fsp is always intact after close_file
 call.

Instead use the already copied smb_fname directly.

https://bugzilla.samba.org/show_bug.cgi?id=13720

Guenther

Signed-off-by: Guenther Deschner <gd at samba.org>
---
 source3/smbd/smb2_close.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/smbd/smb2_close.c b/source3/smbd/smb2_close.c
index 33863d32f5f..1888736e4ae 100644
--- a/source3/smbd/smb2_close.c
+++ b/source3/smbd/smb2_close.c
@@ -263,7 +263,7 @@ static NTSTATUS smbd_smb2_close(struct smbd_smb2_request *req,
 	status = close_file(smbreq, fsp, NORMAL_CLOSE);
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(5,("smbd_smb2_close: close_file[%s]: %s\n",
-			 fsp_str_dbg(fsp), nt_errstr(status)));
+			 smb_fname_str_dbg(smb_fname), nt_errstr(status)));
 		return status;
 	}
 
-- 
2.19.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181218/faf0ea46/signature.sig>


More information about the samba-technical mailing list