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: <20200727.121836.2197759951419525125.davem@davemloft.net>
Date:   Mon, 27 Jul 2020 12:18:36 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     alobakin@...vell.com
Cc:     kuba@...nel.org, irusskikh@...vell.com,
        michal.kalderon@...vell.com, aelior@...vell.com,
        denis.bolotin@...vell.com, GR-everest-linux-l2@...vell.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        dan.carpenter@...cle.com
Subject: Re: [PATCH net-next] qed: fix the allocation of the chains with an
 external PBL

From: Alexander Lobakin <alobakin@...vell.com>
Date: Mon, 27 Jul 2020 14:51:33 +0300

> Dan reports static checker warning:
> 
> "The patch 9b6ee3cf95d3: "qed: sanitize PBL chains allocation" from Jul
> 23, 2020, leads to the following static checker warning:
> 
> 	drivers/net/ethernet/qlogic/qed/qed_chain.c:299 qed_chain_alloc_pbl()
> 	error: uninitialized symbol 'pbl_virt'.
> 
> drivers/net/ethernet/qlogic/qed/qed_chain.c
>    249  static int qed_chain_alloc_pbl(struct qed_dev *cdev, struct qed_chain *chain)
>    250  {
>    251          struct device *dev = &cdev->pdev->dev;
>    252          struct addr_tbl_entry *addr_tbl;
>    253          dma_addr_t phys, pbl_phys;
>    254          __le64 *pbl_virt;
>                 ^^^^^^^^^^^^^^^^
> [...]
>    271          if (chain->b_external_pbl)
>    272                  goto alloc_pages;
>                         ^^^^^^^^^^^^^^^^ uninitialized
> [...]
>    298                  /* Fill the PBL table with the physical address of the page */
>    299                  pbl_virt[i] = cpu_to_le64(phys);
>                         ^^^^^^^^^^^
> [...]
> "
> 
> This issue was introduced with commit c3a321b06a80 ("qed: simplify
> initialization of the chains with an external PBL"), when
> chain->pbl_sp.table_virt initialization was moved up to
> qed_chain_init_params().
> Fix it by initializing pbl_virt with an already filled chain struct field.
> 
> Fixes: c3a321b06a80 ("qed: simplify initialization of the chains with an external PBL")
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Alexander Lobakin <alobakin@...vell.com>

Applied, thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ