lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 Nov 2008 00:38:15 +0200
From:	Izik Eidus <ieidus@...hat.com>
To:	Jonathan Corbet <corbet@....net>
CC:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	kvm@...r.kernel.org, aarcange@...hat.com, chrisw@...hat.com,
	avi@...hat.com
Subject: Re: [PATCH 3/4] add ksm kernel shared memory driver

Jonathan Corbet wrote:
> [Let's see if I can get through the rest without premature sends...]
>
> On Wed, 12 Nov 2008 00:17:39 +0200
> Izik Eidus <ieidus@...hat.com> wrote:
>
>   
>>> Actually, it occurs to me that there's no sanity checks on any of
>>> the values passed in by ioctl().  What happens if the user tells
>>> KSM to scan a bogus range of memory?
>>>     
>>>       
>> Well get_user_pages() run in context of the process, therefore it
>> should fail in "bogus range of memory"
>>     
>
> But it will fail in a totally silent and mysterious way.  Doesn't it
> seem better to verify the values when you can return a meaningful error
> code to the caller?
>
>   

Well I dont mind insert it (the above for sure is not a bug)
but even with that, the user can still free the memory that he gave to us
so this check if "nice to have check", we have nothing to do but to relay on
get_user_pages return value :)

> The other ioctl() calls have the same issue; you can start the thread
> with nonsensical values for the number of pages to scan and the sleep
> time.
>   

well about this i agree, here it make alot of logic to check the values!



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ