[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180511.155046.122041869811590666.davem@davemloft.net>
Date: Fri, 11 May 2018 15:50:46 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: wang6495@....edu
Cc: kjlu@....edu, mac@...ware.de, isdn@...ux-pingi.de,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] isdn: eicon: fix a missing-check bug
From: Wenwen Wang <wang6495@....edu>
Date: Sat, 5 May 2018 14:32:46 -0500
> To avoid such issues, this patch adds a check after the second copy in the
> function diva_xdi_write(). If the adapter number is not equal to the one
> obtained in the first copy, (-4) will be returned to divas_write(), which
> will then return an error code -EINVAL.
Better fix is to copy the msg header once into an on-stack buffer supplied
by diva_write() to diva_xdi_open_adapter(), which is then passed on to
diva_xdi_write() with an adjusted src pointer and length.
Powered by blists - more mailing lists