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:	Fri, 22 Jun 2012 07:21:21 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Kees Cook <keescook@...omium.org>
Cc:	linux-kernel@...r.kernel.org, Rob Landley <rob@...dley.net>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Alan Cox <alan@...ux.intel.com>,
	Marcel Holtmann <marcel@...tmann.org>,
	Doug Ledford <dledford@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Serge Hallyn <serge.hallyn@...onical.com>,
	Joe Korty <joe.korty@...r.com>,
	David Howells <dhowells@...hat.com>,
	James Morris <james.l.morris@...cle.com>,
	linux-doc@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v2] fs: introduce pipe-only dump mode suid_dumpable=3

Kees Cook <keescook@...omium.org> writes:

> This patch introduces suid_dumpable=3 to allow privilege-changed processes
> to be dumped only to a pipe handler (and not directly to disk). The value
> of suid_dumpable=2 is now deprecated, and attempting to set this sysctl
> value returns -EINVAL.

Your patch descriptoin is wrong.  Deprecate means something is encouraged
not to be used not that the functionality is removed.  I think what
you are trying to say is that the value suid_dumpable=2 is now historic.

Your implementation is absolutely gross.  Reading the value from
twice from user space??    Is an if statement that hard to code?

Eric

> +/* Allow only the integers 0, 1, and 3. */
> +static int proc_dointvec_suid_dumpable(struct ctl_table *table, int write,
> +		void __user *buffer, size_t *lenp, loff_t *ppos)
> +{
> +	int rc, min, max;
> +	struct do_proc_dointvec_minmax_conv_param param = {
> +		.min = &min,
> +		.max = &max,
> +	};
> +
> +	min = 0;
> +	max = 1;
> +	rc = do_proc_dointvec(table, write, buffer, lenp, ppos,
> +			      do_proc_dointvec_minmax_conv, &param);
> +	if (rc != -EINVAL)
> +		return rc;
> +
> +	min = 3;
> +	max = 3;
> +	rc = do_proc_dointvec(table, write, buffer, lenp, ppos,
> +			      do_proc_dointvec_minmax_conv, &param);
> +	return rc;
> +}
> +
>  static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write,
>  				     void __user *buffer,
>  				     size_t *lenp, loff_t *ppos,
--
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