lkml.org 
[lkml]   [2024]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [syzbot] [bpf?] [net?] WARNING in __sk_msg_free
Date
please test WARNING in __sk_msg_free

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index e37b4d2e2acd..68dbe821f61d 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -1016,6 +1016,8 @@ static int tls_sw_sendmsg_locked(struct sock *sk, struct msghdr *msg,

msg_pl = &rec->msg_plaintext;
msg_en = &rec->msg_encrypted;
+ if (msg_pl->sg.end >= MAX_MSG_FRAGS)
+ return -EINVAL;

orig_size = msg_pl->sg.size;
full_record = false;

\
 
 \ /
  Last update: 2024-01-09 06:41    [W:0.037 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site