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: <20251212171856.37cfb4dd@stephen-xps.local>
Date: Fri, 12 Dec 2025 17:18:56 +0900
From: Stephen Hemminger <stephen@...workplumber.org>
To: Manas Ghandat <ghandatmanas@...il.com>
Cc: xiyou.wangcong@...il.com, Jiri Pirko <jiri@...nulli.us>, "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>, netdev@...r.kernel.org
Subject: Re: net/sched: Fix divide error in tabledist

On Thu, 11 Dec 2025 23:36:32 +0530
Manas Ghandat <ghandatmanas@...il.com> wrote:

> Previously, a duplication check was added to ensure that a
> duplicating netem cannot exist in a tree with other netems. When
> check_netem_in_tree() fails after parameter updates, the qdisc
> structure is left in an inconsistent state with some new values
> applied but duplicate not updated. Move the tree validation check
> before modifying any qdisc parameters
> Fixes: ec8e0e3d7ade ("net/sched: Restrict conditions for adding 
> duplicating netems to qdisc tree")
> Reported-by: Manas Ghandat <ghandatmanas@...il.com>
> Signed-off-by: Manas Ghandat <ghandatmanas@...il.com>
> ---
> net/sched/sch_netem.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
> diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
> index 32a5f3304046..1a2b498ada83 100644
> --- a/net/sched/sch_netem.c
> +++ b/net/sched/sch_netem.c
> @@ -1055,6 +1055,11 @@ static int netem_change(struct Qdisc *sch, struct 
> nlattr *opt,
> q->loss_model = CLG_RANDOM;
> }
> + ret = check_netem_in_tree(sch, qopt->duplicate, extack);
> + if (ret)
> + goto unlock;
> + q->duplicate = qopt->duplicate;
> +
> if (delay_dist)
> swap(q->delay_dist, delay_dist);
> if (slot_dist)
> @@ -1068,12 +1073,6 @@ static int netem_change(struct Qdisc *sch, struct 
> nlattr *opt,
> q->counter = 0;
> q->loss = qopt->loss;
> - ret = check_netem_in_tree(sch, qopt->duplicate, extack);
> - if (ret)
> - goto unlock;
> -
> - q->duplicate = qopt->duplicate;
> -
> /* for compatibility with earlier versions.
> * if gap is set, need to assume 100% probability
> */

Agree the netem_in_tree error path is incorrect.
The whole netem_in_tree check is problematic as well.

Your mail system is corrupting the patch. The whitespace is messed up.
Is this the same as earlier patch


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ