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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZIrPY2fS7LJI9voI@infradead.org>
Date:   Thu, 15 Jun 2023 01:44:19 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     "min15.li" <min15.li@...sung.com>
Cc:     axboe@...nel.dk, willy@...radead.org, hch@....de,
        dlemoal@...nel.org, gregkh@...uxfoundation.org, wsa@...nel.org,
        vkoul@...nel.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block: add capacity validation in bdev_add_partition()

On Thu, Jun 15, 2023 at 04:09:29PM +0000, min15.li wrote:
> +	if (start >= get_capacity(disk) ||
> +		start + length > get_capacity(disk)) {

We need to check for overflows of the start + length value,
probably best using a helper like check_add_overflow.

Also a single tab indent (and thus the same as code below) is always
wrong for continuations, plase use either two tabs or align to the
opening brace.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ