netdev
[Top] [All Lists]

Re: [patch 4/5] net/ipv6/ip6_flowlabel.c: copy_to_user return code

To: domen@xxxxxxxxxxxx
Subject: Re: [patch 4/5] net/ipv6/ip6_flowlabel.c: copy_to_user return code
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Date: Mon, 07 Mar 2005 07:32:13 +0900 (JST)
Cc: davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, yrgrknmxpzlk@xxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <20050306222118.401D11ED3D@xxxxxxxxxxxxxxxxxxx>
Organization: USAGI Project
References: <20050306222118.401D11ED3D@xxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
In article <20050306222118.401D11ED3D@xxxxxxxxxxxxxxxxxxx> (at Sun, 06 Mar 2005 
23:21:17 +0100), domen@xxxxxxxxxxxx says:

> 
> compile warning cleanup - handle copy_to/from_user error 
> returns

Wrong. You introduce a leak.

>               /* Do not check for fault */
> -             if (!freq.flr_label)
> -                     copy_to_user(&((struct in6_flowlabel_req __user *) 
> optval)->flr_label,
> -                                  &fl->label, sizeof(fl->label));

Don't you see the comment: "Do not check for fault?"

--yoshfuji

<Prev in Thread] Current Thread [Next in Thread>