lkml.org 
[lkml]   [2023]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [syzbot] [net?] KASAN: slab-out-of-bounds Read in dns_resolver_preparse
From
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: [net?] KASAN: slab-out-of-bounds Read in dns_resolver_preparse
Author: eadavis@qq.com

please test slab-out-of-bounds Read in dns_resolver_preparse

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 48e8992e33ab
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c
index 10ba439968f7..f28ba8a703fe 100644
--- a/security/keys/keyctl.c
+++ b/security/keys/keyctl.c
@@ -83,7 +83,7 @@ SYSCALL_DEFINE5(add_key, const char __user *, _type,
long ret;

ret = -EINVAL;
- if (plen > 1024 * 1024 - 1)
+ if (plen > 1024 * 1024 - 1 || plen < 48)
goto error;

/* draw all the data into kernel space */
\
 
 \ /
  Last update: 2023-12-14 15:00    [W:0.424 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site