Subject: Re: [PATCH] drivers/isdn: checkng length to be sure not memory overflow

From: Jiri Slaby <[email-masked]>
Date: Thu, 28 Feb 2013 14:43:48 +0100

On 02/28/2013 12:01 PM, Chen Gang wrote:
> 于 2013年02月28日 18:00, Jiri Slaby 写道:
>> I don't think there are piles of people to care about ISDN much nowadays. 
> 
>   I don't think either.
>     (I found it through reading the source code, by search strncpy)
> 
>   if this is quite minor:
>     I suggest to delete this module.

Nah, there *are* still people using ISDN.

>> So we can
>> close that it is correct to drop the rest of the buffer. In a hope that
>> +M is not followed by text longer than 50-or-so chars.
> 
>   can we be sure that "+M..." is no more than 100+ chars ?
>     (I guess the sizeof (isdn_ctrl.parm) is 80+, but less than 100)
>   if we can not be sure:

No, we cannot be sure that a user gives us less than that. Your patch
just throws the rest to fix that overflow, right? What I'm saying I
wouldn't fix more than that.

-- 
js
suse labs