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] [day] [month] [year] [list]
Message-ID: <87k3rp4y0n.fsf@rustcorp.com.au>
Date:	Mon, 07 Jan 2013 11:20:16 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Sasha Levin <sasha.levin@...cle.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] module: prevent warning when finit_module a 0 sized file

Sasha Levin <sasha.levin@...cle.com> writes:
> On 01/02/2013 07:41 PM, Rusty Russell wrote:
>> Sasha Levin <sasha.levin@...cle.com> writes:
>> 
>>> If we try to finit_module on a file sized 0 bytes vmalloc will
>>> scream and spit out a warning.
>>>
>>> Since modules have to be bigger than 0 bytes anyways we can just
>>> check that beforehand and avoid the warning.
>> 
>> Applied, but I added the comment you somehow missed :)
>
> Thanks!
>
> I do have a somewhat related follow-up question:
>
> When init_module() goes through the module loading process, it will try to vmalloc()
> whatever size passed to it by the user, which may cause vmalloc() to scream and shout
> if the size passed from userspace is too big.
>
> Do you think that reading just the header and doing a quick elf_header_check() on
> it before trying to read the entire file would make sense here?

No.  Root asked, we do.  If modprobe wants to check the header, let it.

Cheers,
Rusty.
--
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