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
| ||
|
Date: Thu, 22 Mar 2018 10:51:50 +0530 From: Vinod Koul <vinod.koul@...el.com> To: Pierre-Yves MORDRET <pierre-yves.mordret@...com> Cc: Maxime Coquelin <mcoquelin.stm32@...il.com>, Alexandre Torgue <alexandre.torgue@...com>, Dan Williams <dan.j.williams@...el.com>, M'boumba Cedric Madianga <cedric.madianga@...il.com>, dmaengine@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH v1 1/1] dmaengine: stm32-dmamux: fix a potential buffer overflow On Tue, Mar 13, 2018 at 05:55:35PM +0100, Pierre-Yves MORDRET wrote: > The bitfield dma_inuse is allocated of size dma_requests bits, thus a > valid bit address is from 0 to (dma_requests - 1). > When find_first_zero_bit() fails, it returns dma_requests as invalid > address. > Using such address for the following set_bit() is incorrect and, if > dma_requests is a multiple of BITS_PER_LONG, it will cause a buffer > overflow. > Currently this driver is only used in DT stm32h743.dtsi where a safe value > dma_requests=16 is not triggering the buffer overflow. > > Fixed by checking the return value of find_first_zero_bit() _before_ > using it. Applied, thanks -- ~Vinod
Powered by blists - more mailing lists