Commit 16337e2f authored by Jan Koester's avatar Jan Koester
Browse files

ksmbd: don't look up pipe handles in the file table for FSCTL_PIPE_TRANSCEIVE

parent da50588b
Loading
Loading
Loading
Loading
Loading
+9 −0
Changes for fs/smb/server/smb2pdu.c: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -9640,6 +9640,15 @@ int smb2_ioctl(struct ksmbd_work *work)
		break;
	}

	/*
	 * A pipe on IPC$ is an RPC handle, not an open file: the transceive
	 * below looks the handle up itself. Looking it up in the file table
	 * fails (-ENOENT), which ended the whole connection.
	 */
	if (cnt_code == FSCTL_PIPE_TRANSCEIVE &&
	    test_share_config_flag(work->tcon->share_conf, KSMBD_SHARE_FLAG_PIPE))
		no_fileid_ioctl = true;

	if (!no_fileid_ioctl && has_file_id(id)) {
		struct ksmbd_file *fp;