[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c5a73038-f441-602b-584b-3d84622b1fb1@nsfocus.com>
Date: Wed, 29 Jul 2020 16:19:00 +0800
From: 张云海 <zhangyunhai@...ocus.com>
To: Jiri Slaby <jirislaby@...nel.org>, b.zolnierkie@...sung.com
Cc: linux-kernel@...r.kernel.org,
Yang Yingliang <yangyingliang@...wei.com>,
Kyungtae Kim <kt0755@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg KH <greg@...ah.com>, Solar Designer <solar@...nwall.com>,
"Srivatsa S. Bhat" <srivatsa@...il.mit.edu>,
Anthony Liguori <aliguori@...zon.com>,
Security Officers <security@...nel.org>,
linux-distros@...openwall.org, dri-devel@...ts.freedesktop.org,
linux-fbdev@...r.kernel.org
Subject: Re: [PATCH] vgacon: fix out of bounds write to the scrollback buffer
On 2020/7/29 16:11, Jiri Slaby wrote:
> But the loop checks for the overflow:
> if (vgacon_scrollback_cur->tail >= vgacon_scrollback_cur->size)
> vgacon_scrollback_cur->tail = 0;
>
> So the first 2 iterations would write to the end of the buffer and this
> 3rd one should have zeroed ->tail.
In the 2nd iteration before the check:
vgacon_scrollback_cur->tail is 65360 which is still less then
vgacon_scrollback_cur->size(65440), so the ->tail won't be zeroed.
Then it gose to the 3rd iteration, overflow occurs.
Regards,
Yunhai Zhang / NSFOCUS Security Team
Powered by blists - more mailing lists