[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <673ec954.050a0220.3c9d61.0169.GAE@google.com>
Date: Wed, 20 Nov 2024 21:47:00 -0800
From: syzbot <syzbot+6c8215822f35fdb35667@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] Re: KASAN: slab-out-of-bounds Read in led_tg_check()
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com.
***
Subject: Re: KASAN: slab-out-of-bounds Read in led_tg_check()
Author: dmantipov@...dex.ru
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git dd7207838d38780b51e4690ee508ab2d5057e099
diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c
index f7b0286d106a..8a80fd76fe45 100644
--- a/net/netfilter/xt_LED.c
+++ b/net/netfilter/xt_LED.c
@@ -96,7 +96,9 @@ static int led_tg_check(const struct xt_tgchk_param *par)
struct xt_led_info_internal *ledinternal;
int err;
- if (ledinfo->id[0] == '\0')
+ /* Bail out if empty string or not a string at all. */
+ if (ledinfo->id[0] == '\0' ||
+ !memchr(ledinfo->id, '\0', sizeof(ledinfo->id)))
return -EINVAL;
mutex_lock(&xt_led_mutex);
Powered by blists - more mailing lists