qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] net: rocker: fix an incorrect array bounds chec


From: Jiri Pirko
Subject: Re: [Qemu-devel] [PATCH] net: rocker: fix an incorrect array bounds check
Date: Tue, 22 Dec 2015 14:36:56 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

Tue, Dec 22, 2015 at 02:07:01PM CET, address@hidden wrote:
>  Hello Scott, Jiri
>
>A stack overflow issue was reported by Mr Qinghao Tang, CC'd here. It occurs
>while processing transmit(tx) descriptors in tx_consume() routine. If a
>descriptor was to have more than allowed(ROCKER_TX_FRAGS_MAX=16) packet
>fragments, the processing loop suffers an off-by-one error. Thus leading to
>OOB memory access and leakage of host memory.
>
>Please see below a proposed patch to fix this issue. Does it look okay?
>
>===
>From f3461d8098a0572786f5a2d7a492863090c73134 Mon Sep 17 00:00:00 2001
>From: Prasad J Pandit <address@hidden>
>Date: Tue, 22 Dec 2015 18:21:00 +0530
>Subject: [PATCH] net: rocker: fix an incorrect array bounds check
>
>While processing transmit(tx) descriptors in 'tx_consume' routine
>the switch emulator suffers from an off-by-one error, if a
>descriptor was to have more than allowed(ROCKER_TX_FRAGS_MAX)
>fragments. Fix an incorrect bounds check to avoid it.
>
>Reported-by: Qinghao Tang <address@hidden>
>Signed-off-by: Prasad J Pandit <address@hidden>

Reviewed-by: Jiri Pirko <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]