Commit 8cb1bb17 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag '6.8-rc-smb-server-fixes-part2' of git://git.samba.org/ksmbd

Pull more smb server updates from Steve French:

 - Fix for incorrect oplock break on directories when leases disabled

 - UAF fix for race between create and destroy of tcp connection

 - Important session setup SPNEGO fix

 - Update ksmbd feature status summary

* tag '6.8-rc-smb-server-fixes-part2' of git://git.samba.org/ksmbd:
  ksmbd: only v2 leases handle the directory
  ksmbd: fix UAF issue in ksmbd_tcp_new_connection()
  ksmbd: validate mech token in session setup
  ksmbd: update feature status in documentation
parents 16df6e07 77bebd18
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -73,15 +73,14 @@ Auto Negotiation Supported.
Compound Request               Supported.
Oplock Cache Mechanism         Supported.
SMB2 leases(v1 lease)          Supported.
Directory leases(v2 lease)     Planned for future.
Directory leases(v2 lease)     Supported.
Multi-credits                  Supported.
NTLM/NTLMv2                    Supported.
HMAC-SHA256 Signing            Supported.
Secure negotiate               Supported.
Signing Update                 Supported.
Pre-authentication integrity   Supported.
SMB3 encryption(CCM, GCM)      Supported. (CCM and GCM128 supported, GCM256 in
                               progress)
SMB3 encryption(CCM, GCM)      Supported. (CCM/GCM128 and CCM/GCM256 supported)
SMB direct(RDMA)               Supported.
SMB3 Multi-channel             Partially Supported. Planned to implement
                               replay/retry mechanisms for future.
@@ -112,6 +111,10 @@ DCE/RPC support Partially Supported. a few calls(NetShareEnumAll,
                               for Witness protocol e.g.)
ksmbd/nfsd interoperability    Planned for future. The features that ksmbd
                               support are Leases, Notify, ACLs and Share modes.
SMB3.1.1 Compression           Planned for future.
SMB3.1.1 over QUIC             Planned for future.
Signing/Encryption over RDMA   Planned for future.
SMB3.1.1 GMAC signing support  Planned for future.
============================== =================================================


+5 −0
Original line number Diff line number Diff line
@@ -214,10 +214,15 @@ static int ksmbd_neg_token_alloc(void *context, size_t hdrlen,
{
	struct ksmbd_conn *conn = context;

	if (!vlen)
		return -EINVAL;

	conn->mechToken = kmemdup_nul(value, vlen, GFP_KERNEL);
	if (!conn->mechToken)
		return -ENOMEM;

	conn->mechTokenLen = (unsigned int)vlen;

	return 0;
}

+0 −6
Original line number Diff line number Diff line
@@ -416,13 +416,7 @@ static void stop_sessions(void)
again:
	down_read(&conn_list_lock);
	list_for_each_entry(conn, &conn_list, conns_list) {
		struct task_struct *task;

		t = conn->transport;
		task = t->handler;
		if (task)
			ksmbd_debug(CONN, "Stop session handler %s/%d\n",
				    task->comm, task_pid_nr(task));
		ksmbd_conn_set_exiting(conn);
		if (t->ops->shutdown) {
			up_read(&conn_list_lock);
+1 −1
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ struct ksmbd_conn {
	__u16				dialect;

	char				*mechToken;
	unsigned int			mechTokenLen;

	struct ksmbd_conn_ops	*conn_ops;

@@ -134,7 +135,6 @@ struct ksmbd_transport_ops {
struct ksmbd_transport {
	struct ksmbd_conn		*conn;
	struct ksmbd_transport_ops	*ops;
	struct task_struct		*handler;
};

#define KSMBD_TCP_RECV_TIMEOUT	(7 * HZ)
+6 −0
Original line number Diff line number Diff line
@@ -1197,6 +1197,12 @@ int smb_grant_oplock(struct ksmbd_work *work, int req_op_level, u64 pid,
	bool prev_op_has_lease;
	__le32 prev_op_state = 0;

	/* Only v2 leases handle the directory */
	if (S_ISDIR(file_inode(fp->filp)->i_mode)) {
		if (!lctx || lctx->version != 2)
			return 0;
	}

	opinfo = alloc_opinfo(work, pid, tid);
	if (!opinfo)
		return -ENOMEM;
Loading