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] [day] [month] [year] [list]
Message-ID: <20171226115309.GC2173@nanopsycho>
Date:   Tue, 26 Dec 2017 12:53:09 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Alexander Aring <aring@...atatu.com>
Cc:     jhs@...atatu.com, xiyou.wangcong@...il.com, davem@...emloft.net,
        netdev@...r.kernel.org, kernel@...atatu.com,
        David Ahern <dsahern@...il.com>
Subject: Re: [PATCHv4 net-next 02/14] net: sched: sch_api: handle generic
 qdisc errors

Wed, Dec 20, 2017 at 06:35:12PM CET, aring@...atatu.com wrote:
>This patch adds extack support for generic qdisc handling. The extack
>will be set deeper to each called function which is not part of netdev
>core api.
>
>Cc: David Ahern <dsahern@...il.com>
>Acked-by: Jamal Hadi Salim <jhs@...atatu.com>
>Signed-off-by: Alexander Aring <aring@...atatu.com>
>---

[...]


>@@ -1349,21 +1387,33 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n,
> 
> 		if (!q || !tcm->tcm_handle || q->handle != tcm->tcm_handle) {
> 			if (tcm->tcm_handle) {
>-				if (q && !(n->nlmsg_flags & NLM_F_REPLACE))
>+				if (q && !(n->nlmsg_flags & NLM_F_REPLACE)) {
>+					NL_SET_ERR_MSG(extack, "NLM_F_REPLACE needed to override");
> 					return -EEXIST;
>-				if (TC_H_MIN(tcm->tcm_handle))
>+				}
>+				if (TC_H_MIN(tcm->tcm_handle)) {
>+					NL_SET_ERR_MSG(extack, "Invalid minor handle");
> 					return -EINVAL;
>+				}
> 				q = qdisc_lookup(dev, tcm->tcm_handle);
>-				if (!q)
>+				if (!q) {
>+					NL_SET_ERR_MSG(extack, "No qdisc found for specified handle");

This is incorrect. This is hit on successpath as well, confusing user
with the message. I will send fix shortly.


> 					goto create_n_graft;
>-				if (n->nlmsg_flags & NLM_F_EXCL)
>+				}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ