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: <536ede34-e360-78a5-ef6f-df032fa30154@clicknet.pro>
Date:   Fri, 18 Nov 2022 22:44:17 +0300
From:   Ananda Badmaev <a.badmaev@...cknet.pro>
To:     Kees Cook <keescook@...omium.org>
Cc:     Jonathan Corbet <corbet@....net>, linux-kernel@...r.kernel.org,
        Minchan Kim <minchan@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        linux-mm@...ck.org, linux-doc@...r.kernel.org,
        Vitaly Wool <vitaly.wool@...sulko.com>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        linux-next@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: Coverity: zblock_alloc(): Memory - illegal accesses

18.11.2022 19:43, Kees Cook пишет:
> Ah-ha, understood. Well, if you do want to catch it if there is ever a
> typo in the block_desc values (which are not obviously >4096 without
> sitting down and calculating them), perhaps add:
> 
>          if (WARN_ON(block_type >= ARRAY_SIZE(block_desc))
>                  return -ENOSPC;
> 
> 

Probably it would be better to add a single check on the largest 
slot_size >= PAGE_SIZE at pool creation time.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ