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: <5f52b3d3-6720-426d-6f8c-dfed997e4705@canonical.com>
Date:   Sat, 30 Jun 2018 22:11:41 +0100
From:   Colin Ian King <colin.king@...onical.com>
To:     Christoph Hellwig <hch@....de>, linux-nvdimm@...ts.01.org
Cc:     Dan Williams <dan.j.williams@...el.com>,
        Logan Gunthorpe <logang@...tatee.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: re: memremap: change devm_memremap_pages interface to use struct
 dev_pagemap

Hi,

static analysis with CoverityScan detected an issue with the following
commit:

commit e8d5134833006a46fcbefc5f4a84d0b62bd520e7
Author: Christoph Hellwig <hch@....de>
Date:   Fri Dec 29 08:54:05 2017 +0100

    memremap: change devm_memremap_pages interface to use struct dev_pagemap


247        }
248
   CID 1464431 (#1 of 1): Unchecked return value (CHECKED_RETURN)
check_return: Calling devm_add_action without checking return value (as
is done elsewhere 33 out of 35 times).

249        devm_add_action(dev, devm_memremap_pages_release, pgmap);
250
251        return __va(res->start);

devm_add_action can fail and return -ENOMEM because it calls
devres_alloc which can fail in an out of memory situation. So I believe
it may be pertinent to add a -ENOMEM check and clean up appropriately.
I'm not sure of the correct way to perform the error clean up, so I'm
sending this report instead of a fix.

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ