From 4b3e5c2f036f868e38ad5da7faba05db32f624f4 Mon Sep 17 00:00:00 2001
From: Jeremy Allison <jra@samba.org>
Date: Tue, 25 Jul 2023 17:54:41 -0700
Subject: [PATCH 03/30] CVE-2023-3961:s3: smbd: Remove the SMB_ASSERT() that
 crashes on bad pipenames.

We correctly handle this and just return ENOENT (NT_STATUS_OBJECT_NAME_NOT_FOUND).

Remove knowfail.

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

Signed-off-by: Jeremy Allison <jra@samba.org>

Conflict: NA
Reference: https://download.samba.org/pub/samba/patches/security/samba-4.17.12-security-2023-10-10.patch
[PATCH 03/30] CVE-2023-3961:s3: smbd: Remove the SMB_ASSERT() that
 crashes on bad pipenames.
---
 selftest/knownfail.d/badpipename | 1 -
 source3/rpc_client/local_np.c    | 5 -----
 2 files changed, 6 deletions(-)
 delete mode 100644 selftest/knownfail.d/badpipename

diff --git a/selftest/knownfail.d/badpipename b/selftest/knownfail.d/badpipename
deleted file mode 100644
index e69715f863d..00000000000
--- a/selftest/knownfail.d/badpipename
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.smbtorture_s3.smb2.SMB2-INVALID-PIPENAME.smbtorture\(fileserver\)
diff --git a/source3/rpc_client/local_np.c b/source3/rpc_client/local_np.c
index 95228d5d801..791ded99a47 100644
--- a/source3/rpc_client/local_np.c
+++ b/source3/rpc_client/local_np.c
@@ -551,11 +551,6 @@ struct tevent_req *local_np_connect_send(
 	{
 		DBG_DEBUG("attempt to connect to invalid pipe pathname %s\n",
 			lower_case_pipename);
-		/*
-		 * For now, panic the server until we have
-		 * the test code in place.
-		 */
-		SMB_ASSERT(false);
 		tevent_req_error(req, ENOENT);
 		return tevent_req_post(req, ev);
 	}
-- 
2.34.1
