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: <5663AE1A.2080808@oracle.com>
Date:	Sat, 5 Dec 2015 22:40:10 -0500
From:	Sasha Levin <sasha.levin@...cle.com>
To:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org, mathieu.poirier@...aro.org,
	peter.lachner@...el.com, norbert.schulz@...el.com,
	keven.boell@...el.com, yann.fouassier@...el.com,
	laurent.fert@...el.com, linux-api@...r.kernel.org
Subject: Re: [PATCH v4 01/11] stm class: Introduce an abstraction for System
 Trace Module devices

On 09/22/2015 08:47 AM, Alexander Shishkin wrote:
> +static ssize_t stm_char_write(struct file *file, const char __user *buf,
> +			      size_t count, loff_t *ppos)
> +{
> +	struct stm_file *stmf = file->private_data;
> +	struct stm_device *stm = stmf->stm;
> +	char *kbuf;
> +	int err;
> +
> +	/*
> +	 * if no m/c have been assigned to this writer up to this
> +	 * point, use "default" policy entry
> +	 */
> +	if (!stmf->output.nr_chans) {
> +		err = stm_file_assign(stmf, "default", 1);
> +		/*
> +		 * EBUSY means that somebody else just assigned this
> +		 * output, which is just fine for write()
> +		 */
> +		if (err && err != -EBUSY)
> +			return err;
> +	}
> +
> +	kbuf = kmalloc(count + 1, GFP_KERNEL);

This bit allows for user-controllable kmalloc() allocation lengths, including
a possible overflow.


Thanks,
Sasha
--
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