All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] smb/server: fix SMB2_MIN_SUPPORTED_HEADER_SIZE value
@ 2025-12-18 17:10 chenxiaosong.chenxiaosong
  2025-12-19  0:16 ` Namjae Jeon
  0 siblings, 1 reply; 13+ messages in thread
From: chenxiaosong.chenxiaosong @ 2025-12-18 17:10 UTC (permalink / raw)
  To: dhowells, sfrench, smfrench, linkinjeon, linkinjeon, pc,
	ronniesahlberg, sprasad, tom, bharathsm, senozhatsky
  Cc: linux-cifs, ChenXiaoSong

From: ChenXiaoSong <chenxiaosong@kylinos.cn>

See RFC1002 4.3.1.

The LENGTH field is the number of bytes following the LENGTH
field.  In other words, LENGTH is the combined size of the
TRAILER field(s).

Link: https://lore.kernel.org/linux-cifs/e4fbcbad-459a-412c-918c-0279ec890353@linux.dev/
Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
---
 fs/smb/server/connection.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/smb/server/connection.c b/fs/smb/server/connection.c
index b6b4f1286b9c..da6dfd0d80c2 100644
--- a/fs/smb/server/connection.c
+++ b/fs/smb/server/connection.c
@@ -296,7 +296,7 @@ bool ksmbd_conn_alive(struct ksmbd_conn *conn)
 }
 
 #define SMB1_MIN_SUPPORTED_HEADER_SIZE (sizeof(struct smb_hdr))
-#define SMB2_MIN_SUPPORTED_HEADER_SIZE (sizeof(struct smb2_hdr) + 4)
+#define SMB2_MIN_SUPPORTED_HEADER_SIZE (sizeof(struct smb2_hdr))
 
 /**
  * ksmbd_conn_handler_loop() - session thread to listen on new smb requests
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-12-19 13:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-18 17:10 [PATCH] smb/server: fix SMB2_MIN_SUPPORTED_HEADER_SIZE value chenxiaosong.chenxiaosong
2025-12-19  0:16 ` Namjae Jeon
2025-12-19  0:59   ` ChenXiaoSong
2025-12-19  1:16     ` Namjae Jeon
2025-12-19  1:30       ` ChenXiaoSong
2025-12-19  1:42         ` Namjae Jeon
2025-12-19  1:45           ` ChenXiaoSong
2025-12-19  8:17       ` David Howells
2025-12-19 10:32         ` Namjae Jeon
2025-12-19 10:42           ` ChenXiaoSong
2025-12-19 10:50           ` David Howells
2025-12-19 11:52             ` Namjae Jeon
2025-12-19 13:53               ` ChenXiaoSong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.