lkml.org 
[lkml]   [2019]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: remove duplicate fetch in sock_getsockopt
From
From: JingYi Hou <houjingyi647@gmail.com>
Date: Mon, 17 Jun 2019 14:56:05 +0800

> In sock_getsockopt(), 'optlen' is fetched the first time from userspace.
> 'len < 0' is then checked. Then in condition 'SO_MEMINFO', 'optlen' is
> fetched the second time from userspace.
>
> If change it between two fetches may cause security problems or unexpected
> behaivor, and there is no reason to fetch it a second time.
>
> To fix this, we need to remove the second fetch.
>
> Signed-off-by: JingYi Hou <houjingyi647@gmail.com>

Applied and queued up for -stable, thanks.

\
 
 \ /
  Last update: 2019-06-18 19:05    [W:0.033 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site