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: <20090608160740.4d57ba5d.akpm@linux-foundation.org>
Date:	Mon, 8 Jun 2009 16:07:40 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	steiner@....com
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [Patch 04/12] GRU - collect per-context user statistics

On Mon, 08 Jun 2009 12:16:52 -0500
steiner@....com wrote:

>  /*
> + * Fetch GSEG statisticss
> + */
> +long gru_get_gseg_statistics(unsigned long arg)
> +{
> +	struct gru_thread_state *gts;
> +	struct gru_get_gseg_statistics_req req;
> +
> +	if (copy_from_user(&req, (void __user *)arg, sizeof(req)))
> +		return -EFAULT;
> +
> +	gts = gru_find_lock_gts(req.gseg);
> +	if (gts) {
> +		memcpy(&req.stats, &gts->ustats, sizeof(gts->ustats));
> +		gru_unlock_gts(gts);
> +	} else {
> +		memset(&req.stats, 0, sizeof(gts->ustats));
> +	}
> +
> +	if (copy_to_user((void __user *)arg, &req, sizeof(req)))
> +		return -EFAULT;
> +
> +	return 0;
> +}

So..  what's happening in the super-secret undocumented gts==NULL path?

It _looks_ like userspace passed into this ioctl a handle for something
which the kernel doesn't know about.  If so, shouldn't we return
-EINVAL or something?  

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