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: <241c3bdf-53bf-a828-c57a-034b16f4839a@gmail.com>
Date:   Sun, 15 Sep 2019 11:47:19 -0600
From:   David Ahern <dsahern@...il.com>
To:     Leon Romanovsky <leon@...nel.org>, David Ahern <dsahern@...il.com>
Cc:     Mark Zhang <markz@...lanox.com>, netdev <netdev@...r.kernel.org>,
        RDMA mailing list <linux-rdma@...r.kernel.org>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Leon Romanovsky <leonro@...lanox.com>
Subject: Re: [PATCH iproute2-next] rdma: Check comm string before print in
 print_comm()

On 9/11/19 2:12 AM, Leon Romanovsky wrote:
> From: Mark Zhang <markz@...lanox.com>
> 
> Broken kernels (not-upstream) can provide wrong empty "comm" field.
> It causes to segfault while printing in JSON format.
> 
> Fixes: 8ecac46a60ff ("rdma: Add QP resource tracking information")

that commit is from 2018, so this should go to master; re-assigned in
patchwork.

> Signed-off-by: Mark Zhang <markz@...lanox.com>
> Signed-off-by: Leon Romanovsky <leonro@...lanox.com>
> ---
>  rdma/res.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/rdma/res.c b/rdma/res.c
> index 97a7b964..6003006e 100644
> --- a/rdma/res.c
> +++ b/rdma/res.c
> @@ -161,6 +161,9 @@ void print_comm(struct rd *rd, const char *str, struct nlattr **nla_line)
>  {
>  	char tmp[18];
>  
> +	if (!str)
> +		return;
> +
>  	if (rd->json_output) {
>  		/* Don't beatify output in JSON format */
>  		jsonw_string_field(rd->jw, "comm", str);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ