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: <20120424151544.GH21224@moon>
Date:	Tue, 24 Apr 2012 19:15:44 +0400
From:	Cyrill Gorcunov <gorcunov@...nvz.org>
To:	KOSAKI Motohiro <kosaki.motohiro@...il.com>
Cc:	mtk.manpages@...il.com, Pavel Emelyanov <xemul@...allels.com>,
	linux-man@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	Tejun Heo <tj@...nel.org>, Andrew Morton <akpm@...l.org>
Subject: Re: Bad error return after find_vma() in PR_SET_MM code

On Tue, Apr 24, 2012 at 11:12:15AM -0400, KOSAKI Motohiro wrote:
> (4/15/12 12:00 AM), Michael Kerrisk (man-pages) wrote:
> >[Bother! Resending with corrected subject line (was "[PATCH 1/2]
> >prctl: Add PR_SET_MM option description")]
> >
> >Cyrill,
> >
> >While reviewing your patch to the prctl() manual page, I noticed the
> >following code in kernel/sys.c::prctl_set_mm():
> >
> >        if (opt != PR_SET_MM_START_BRK&&  opt != PR_SET_MM_BRK) {
> >                /* It must be existing VMA */
> >                if (!vma || vma->vm_start>  addr)
> >                        goto out;
> >        }
> >
> >At this point, the code causes an exit with error set to zero (i.e.,
> >success). This looks unintended to me. Is the code correct? I suspect
> >a return of -EFAULT or -ENOMEM is warranted.
> 
> EFAULT please when detecting invalid vma.

Thanks for reminder, Kosaki! I'll cook a patch asap.

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