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-next>] [day] [month] [year] [list]
Date:   Mon, 21 Nov 2022 10:29:09 +0800
From:   Lai Peter Jun Ann <jun.ann.lai@...el.com>
To:     netdev@...r.kernel.org
Cc:     David Ahern <dsahern@...nel.org>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Vinicius Costa Gomes <vinicius.gomes@...el.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@...el.com>,
        Lai Peter Jun Ann <jun.ann.lai@...el.com>
Subject: [PATCH iproute2-next v1] tc_util: Change datatype for maj to avoid overflow issue

The return value by stroul() is unsigned long int. Hence the datatype
for maj should defined as unsigned long to avoid overflow issue.

Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@...el.com>
Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@...el.com>
---
 tc/tc_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tc/tc_util.c b/tc/tc_util.c
index 44137ad..f8d9c88 100644
--- a/tc/tc_util.c
+++ b/tc/tc_util.c
@@ -74,7 +74,7 @@ const char *get_tc_lib(void)
 
 int get_qdisc_handle(__u32 *h, const char *str)
 {
-	__u32 maj;
+	unsigned long maj;
 	char *p;
 
 	maj = TC_H_UNSPEC;
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ