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: <loom.20150613T040202-820@post.gmane.org>
Date:	Sat, 13 Jun 2015 02:06:13 +0000 (UTC)
From:	Chris Wulff <crwulff@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] configfs: Implement binary attributes (v3)

Pantelis Antoniou <pantelis.antoniou <at> konsulko.com> writes:

...
> +static ssize_t
> +configfs_write_bin_file(struct file *file, const char __user *buf,
> +			size_t count, loff_t *ppos)
> +{
...
> +	len = simple_write_to_buffer(buffer->bin_buffer,
> +			buffer->bin_buffer_size, ppos, buf, count);
> +	if (len > 0)
> +		*ppos += len;
> +out:
> +	mutex_unlock(&buffer->mutex);
> +	return len;
> +}
> +
...

It appears there is a small bug in this code. If you write more than one page 
worth of data it incorrectly skips ahead. This code should NOT increment ppos 
as the simple_write_to_buffer call already does that for you.

-- Chris Wulff

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