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>] [day] [month] [year] [list]
Message-ID: <0778c492-984e-b09e-cb1c-750c8256c346@gmail.com>
Date:   Thu, 12 Aug 2021 16:10:24 +0800
From:   Tuo Li <islituo@...il.com>
To:     gregkh@...uxfoundation.org, jirislaby@...nel.org
Cc:     linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        "baijiaju1990@...il.com" <baijiaju1990@...il.com>
Subject: serial: sh-sci: Is there a potential buffer underflow in
 sci_dma_rx_complete()?

Hello,

Our static analysis tool reports a possible buffer underflow in sh-sci.c 
in Linux 5.14.0-rc3:

The variable active is checked in:
1304:    if (active >= 0)

This indicates that it can be negative.
If so, a possible buffer underflow will occur:
1312:    desc = dmaengine_prep_slave_sg(s->chan_rx, &s->sg_rx[active], 
1, ....);

However, I am not sure whether &s->sg_rx[active] will be used in 
dmaengine_prep_slave_sg() if the
function sci_dma_rx_find_active() called at Line 1303 returns a negative 
value (-1).

Any feedback would be appreciated, thanks!

Reported-by: TOTE Robot <oslab@...nghua.edu.cn>

Best wishes,
Tuo Li

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ