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]
Message-Id: <20191105211336.10075-1-jakub.kicinski@netronome.com>
Date:   Tue,  5 Nov 2019 13:13:36 -0800
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     stephen@...workplumber.org
Cc:     dsahern@...il.com, oss-drivers@...ronome.com,
        netdev@...r.kernel.org,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Jiri Pirko <jiri@...lanox.com>,
        Arkadi Sharshevsky <arkadis@...lanox.com>
Subject: [PATCH iproute2] devlink: require resource parameters

If devlink resource set parameters are not provided it crashes:
$ devlink resource set netdevsim/netdevsim0
Segmentation fault (core dumped)

This is because even though DL_OPT_RESOURCE_PATH and
DL_OPT_RESOURCE_SIZE are passed as o_required, the validation
table doesn't contain a relevant string.

Fixes: 8cd644095842 ("devlink: Add support for devlink resource abstraction")
Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
--
CC: Jiri Pirko <jiri@...lanox.com>
CC: Arkadi Sharshevsky <arkadis@...lanox.com>
---
 devlink/devlink.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 5bbe0bddd910..056ac95ee726 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -1121,6 +1121,8 @@ static const struct dl_args_metadata dl_args_required[] = {
 	{DL_OPT_DPIPE_TABLE_NAME,     "Dpipe table name expected."},
 	{DL_OPT_DPIPE_TABLE_COUNTERS, "Dpipe table counter state expected."},
 	{DL_OPT_ESWITCH_ENCAP_MODE,   "E-Switch encapsulation option expected."},
+	{DL_OPT_RESOURCE_PATH,	      "Resource path expected."},
+	{DL_OPT_RESOURCE_SIZE,	      "Resource size expected."},
 	{DL_OPT_PARAM_NAME,	      "Parameter name expected."},
 	{DL_OPT_PARAM_VALUE,	      "Value to set expected."},
 	{DL_OPT_PARAM_CMODE,	      "Configuration mode expected."},
-- 
2.23.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ