Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128329 - Kernel: Not zero terminated buffer Local DoS (CVE-2006-1055)
Summary: Kernel: Not zero terminated buffer Local DoS (CVE-2006-1055)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Kernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Security
URL: http://git.kernel.org/?p=linux/kernel...
Whiteboard: [linux <2.6.16.2]
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-31 22:34 UTC by Sune Kloppenborg Jeppesen (RETIRED)
Modified: 2009-07-11 09:52 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-03-31 22:34:26 UTC
Should be public anytime but filing it as restricted until then. Feel free to remove.

From: Greg Kroah-Hartman <gregkh@suse.de>
Subject: sysfs: zero terminate sysfs write buffers

No one should be writing a PAGE_SIZE worth of data to a normal sysfs
file, so properly terminate the buffer.

Thanks to Al Viro for pointing out my supidity here.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 fs/sysfs/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- gregkh-2.6.orig/fs/sysfs/file.c
+++ gregkh-2.6/fs/sysfs/file.c
@@ -192,7 +192,7 @@ fill_write_buffer(struct sysfs_buffer * 
                return -ENOMEM;
 
        if (count >= PAGE_SIZE)
-               count = PAGE_SIZE;
+               count = PAGE_SIZE - 1;
        error = copy_from_user(buffer->page,buf,count);
        buffer->needs_read_fill = 1;
        return error ? -EFAULT : count;
Comment 1 Stefan Cornelius (RETIRED) gentoo-dev 2006-04-04 02:35:36 UTC
fixed in in 2.6.17-rc1, so it's public
Comment 2 Tim Yamin (RETIRED) gentoo-dev 2006-04-15 13:30:34 UTC
Adding maintainers to CC:

hppa-sources-2.6: GMSoft
mips-sources-2.6.15: Kumba
rsbac-sources-2.6: kang
usermode-sources-2.6: dsd
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2006-04-19 16:14:44 UTC
chrb: Please bump xen-sources.
Comment 4 Guy Martin (RETIRED) gentoo-dev 2006-04-23 12:51:45 UTC
hppa-sources-2.6.16.9-pa11 in the tree.
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2006-05-08 05:45:53 UTC
usermode-sources fixed thanks to dang
Comment 6 Tim Yamin (RETIRED) gentoo-dev 2006-05-28 13:10:39 UTC
All done (apart from sh-sources); resolving.