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: <20140425215509.GD18016@ZenIV.linux.org.uk>
Date:	Fri, 25 Apr 2014 22:55:09 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	Dmitry Kasatkin <dmitry.kasatkin@...il.com>,
	Oleg Nesterov <oleg@...hat.com>,
	Dmitry Kasatkin <d.kasatkin@...sung.com>,
	linux-security-module <linux-security-module@...r.kernel.org>,
	John Johansen <john.johansen@...onical.com>,
	Mimi Zohar <zohar@...ux.vnet.ibm.com>,
	James Morris <jmorris@...ei.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	kernel-team <kernel-team@...ts.ubuntu.com>
Subject: Re: Kernel panic at Ubuntu: IMA + Apparmor

On Fri, Apr 25, 2014 at 02:43:42PM -0700, Eric W. Biederman wrote:

> ssize_t __vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
> {
> 	ssize_t ret;
> 
> 	if (!(file->f_mode & FMODE_READ))
> 		return -EBADF;
> 	if (!file->f_op->read && !file->f_op->aio_read)
> 		return -EINVAL;
> 	if (unlikely(!access_ok(VERIFY_WRITE, buf, count)))
> 		return -EFAULT;
> 
> 	if (ret >= 0) {
> 		count = ret;
> 		if (file->f_op->read)
> 			ret = file->f_op->read(file, buf, count, pos);
> 		else
> 			ret = do_sync_read(file, buf, count, pos);
> 	}
> 
> 	return ret;
> }

... which lacks the f_pos wraparound, etc. checks done by rw_verify_area().
IOW, it's one more place to grep through while verifying that ->read()
et.al. do not get called with such arguments.

fanotify probably could be skipped - ask the security circus crowd about
that one, it's their bast^Wbaby.  add_rchar() and inc_syscr()... depends on
whether you want those reads hidden from accounting.
--
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