lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250613042412.328342-1-kuni1840@gmail.com>
Date: Thu, 12 Jun 2025 21:24:05 -0700
From: Kuniyuki Iwashima <kuni1840@...il.com>
To: syzbot+1d3c235276f62963e93a@...kaller.appspotmail.com
Cc: 3chas3@...il.com,
	kuni1840@...il.com,
	kuniyu@...gle.com,
	linux-atm-general@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [atm?] KMSAN: uninit-value in atmtcp_c_send

From: syzbot <syzbot+1d3c235276f62963e93a@...kaller.appspotmail.com>
Date: Thu, 12 Jun 2025 20:48:02 -0700
> Hello,
> 
> syzbot has tested the proposed patch and the reproducer did not trigger any issue:
> 
> Reported-by: syzbot+1d3c235276f62963e93a@...kaller.appspotmail.com
> Tested-by: syzbot+1d3c235276f62963e93a@...kaller.appspotmail.com
> 
> Tested on:
> 
> commit:         27605c8c Merge tag 'net-6.16-rc2' of git://git.kernel...
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=16d17682580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=42d51b7b9f9e61d
> dashboard link: https://syzkaller.appspot.com/bug?extid=1d3c235276f62963e93a
> compiler:       Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
> patch:          https://syzkaller.appspot.com/x/patch.diff?x=129e7682580000
> 
> Note: testing is done by a robot and is best-effort only.

I noticed the original code didn't call dev_kfree_skb() and leaked
sk_buff_head.

Also, most of the ATM drivers don't call atm_return() to revert
the memory accounting by atm_account_tx() in vcc_sendmsg(), but
that's another bug...

#syz test

diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
index d4aa0f353b6c..5ce3c6c066e1 100644
--- a/drivers/atm/atmtcp.c
+++ b/drivers/atm/atmtcp.c
@@ -288,7 +288,11 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
 	struct sk_buff *new_skb;
 	int result = 0;
 
-	if (!skb->len) return 0;
+	if (skb->len < sizeof(struct atmtcp_hdr)) {
+		dev_kfree_skb(skb);
+		return -EINVAL;
+	}
+
 	dev = vcc->dev_data;
 	hdr = (struct atmtcp_hdr *) skb->data;
 	if (hdr->length == ATMTCP_HDR_MAGIC) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ