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: <aIpbK1q47giH8SRg@pop-os.localdomain>
Date: Wed, 30 Jul 2025 10:49:31 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Takamitsu Iwai <takamitz@...zon.co.jp>
Cc: Vinicius Costa Gomes <vinicius.gomes@...el.com>,
	Jamal Hadi Salim <jhs@...atatu.com>, Jiri Pirko <jiri@...nulli.us>,
	netdev@...r.kernel.org, Kuniyuki Iwashima <kuniyu@...gle.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Vladimir Oltean <olteanv@...il.com>, takamitz@...zon.com,
	syzbot+398e1ee4ca2cac05fddb@...kaller.appspotmail.com
Subject: Re: [PATCH v3 net] net/sched: taprio: enforce minimum value for
 picos_per_byte

On Tue, Jul 29, 2025 at 02:31:49AM +0900, Takamitsu Iwai wrote:
> Syzbot reported a WARNING in taprio_get_start_time().
> 
> When link speed is 470,589 or greater, q->picos_per_byte becomes too
> small, causing length_to_duration(q, ETH_ZLEN) to return zero.
> 
> This zero value leads to validation failures in fill_sched_entry() and
> parse_taprio_schedule(), allowing arbitrary values to be assigned to
> entry->interval and cycle_time. As a result, sched->cycle can become zero.
> 
> Since SPEED_800000 is the largest defined speed in
> include/uapi/linux/ethtool.h, this issue can occur in realistic scenarios.
> 
> To ensure length_to_duration() returns a non-zero value for minimum-sized
> Ethernet frames (ETH_ZLEN = 60), picos_per_byte must be at least 17
> (60 * 17 > PSEC_PER_NSEC which is 1000).
> 
> This patch enforces a minimum value of 17 for picos_per_byte when the
> calculated value would be lower, and adds a warning message to inform
> users that scheduling accuracy may be affected at very high link speeds.

Is it possible to reproduce this with a selftest? If so, please consider
adding one.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ