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]
Message-Id: <200710310212.42674.arnd@arndb.de>
Date:	Wed, 31 Oct 2007 02:12:42 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Joel Becker <Joel.Becker@...cle.com>
Cc:	Linux Netdev <linux-netdev@...r.kernel.org>,
	Linux Kernel Mailing List <Linux-Kernel@...r.kernel.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: Re: dev_ifname32() fails on 32->64bit calls in copy_in_user().

On Wednesday 31 October 2007, Joel Becker wrote:
> 
>         Instrumenting the kernel with printks, the EFAULT comes from
> the first copy_in_user() at line 325 of fs/compat_ioctl.c (in
> dev_ifname32()).  I put some access_ok() checks in, and they do not
> trigger (access is ok).  The call never even gets into sys_ioctl().

Can you printk the pointers (arg and uifr) as well? Maybe the end up
unaligned or otherwise corrupted for some reason.

Does the same thing happen when you try the ioctl on something that
is not even a socket? E.g.

#include <whatever you need...>
int main(void)
{
	struct ifreq ifr = {};
	ioctl(0 /* standard input! */, SIOCGIFNAME, &ifr);
	perror("ioctl");
}

	Arnd <><
-
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