summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/usermode-sources/files/usermode-sources-2.6.16-CVE-2006-4145.patch')
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.16-CVE-2006-4145.patch92
1 files changed, 0 insertions, 92 deletions
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.16-CVE-2006-4145.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.16-CVE-2006-4145.patch
deleted file mode 100644
index 7b6457798ee5..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.16-CVE-2006-4145.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-diff --exclude-from=/home/dang/.diffrc -u -ruN linux-2.6.16.orig/fs/udf/super.c linux-2.6.16/fs/udf/super.c
---- linux-2.6.16.orig/fs/udf/super.c 2006-03-20 00:53:29.000000000 -0500
-+++ linux-2.6.16/fs/udf/super.c 2006-09-06 19:10:33.000000000 -0400
-@@ -1657,7 +1657,7 @@
- iput(inode);
- goto error_out;
- }
-- sb->s_maxbytes = MAX_LFS_FILESIZE;
-+ sb->s_maxbytes = 1<<30;
- return 0;
-
- error_out:
-diff --exclude-from=/home/dang/.diffrc -u -ruN linux-2.6.16.orig/fs/udf/truncate.c linux-2.6.16/fs/udf/truncate.c
---- linux-2.6.16.orig/fs/udf/truncate.c 2006-03-20 00:53:29.000000000 -0500
-+++ linux-2.6.16/fs/udf/truncate.c 2006-09-06 19:10:33.000000000 -0400
-@@ -239,37 +239,51 @@
- {
- if (offset)
- {
-- extoffset -= adsize;
-- etype = udf_next_aext(inode, &bloc, &extoffset, &eloc, &elen, &bh, 1);
-- if (etype == (EXT_NOT_RECORDED_NOT_ALLOCATED >> 30))
-- {
-- extoffset -= adsize;
-- elen = EXT_NOT_RECORDED_NOT_ALLOCATED | (elen + offset);
-- udf_write_aext(inode, bloc, &extoffset, eloc, elen, bh, 0);
-+ /*
-+ * OK, there is not extent covering inode->i_size and
-+ * no extent above inode->i_size => truncate is
-+ * extending the file by 'offset'.
-+ */
-+ if ((!bh && extoffset == udf_file_entry_alloc_offset(inode)) ||
-+ (bh && extoffset == sizeof(struct allocExtDesc))) {
-+ /* File has no extents at all! */
-+ memset(&eloc, 0x00, sizeof(kernel_lb_addr));
-+ elen = EXT_NOT_RECORDED_NOT_ALLOCATED | offset;
-+ udf_add_aext(inode, &bloc, &extoffset, eloc, elen, &bh, 1);
- }
-- else if (etype == (EXT_NOT_RECORDED_ALLOCATED >> 30))
-- {
-- kernel_lb_addr neloc = { 0, 0 };
-+ else {
- extoffset -= adsize;
-- nelen = EXT_NOT_RECORDED_NOT_ALLOCATED |
-- ((elen + offset + inode->i_sb->s_blocksize - 1) &
-- ~(inode->i_sb->s_blocksize - 1));
-- udf_write_aext(inode, bloc, &extoffset, neloc, nelen, bh, 1);
-- udf_add_aext(inode, &bloc, &extoffset, eloc, (etype << 30) | elen, &bh, 1);
-- }
-- else
-- {
-- if (elen & (inode->i_sb->s_blocksize - 1))
-+ etype = udf_next_aext(inode, &bloc, &extoffset, &eloc, &elen, &bh, 1);
-+ if (etype == (EXT_NOT_RECORDED_NOT_ALLOCATED >> 30))
- {
- extoffset -= adsize;
-- elen = EXT_RECORDED_ALLOCATED |
-- ((elen + inode->i_sb->s_blocksize - 1) &
-+ elen = EXT_NOT_RECORDED_NOT_ALLOCATED | (elen + offset);
-+ udf_write_aext(inode, bloc, &extoffset, eloc, elen, bh, 0);
-+ }
-+ else if (etype == (EXT_NOT_RECORDED_ALLOCATED >> 30))
-+ {
-+ kernel_lb_addr neloc = { 0, 0 };
-+ extoffset -= adsize;
-+ nelen = EXT_NOT_RECORDED_NOT_ALLOCATED |
-+ ((elen + offset + inode->i_sb->s_blocksize - 1) &
- ~(inode->i_sb->s_blocksize - 1));
-- udf_write_aext(inode, bloc, &extoffset, eloc, elen, bh, 1);
-+ udf_write_aext(inode, bloc, &extoffset, neloc, nelen, bh, 1);
-+ udf_add_aext(inode, &bloc, &extoffset, eloc, (etype << 30) | elen, &bh, 1);
-+ }
-+ else
-+ {
-+ if (elen & (inode->i_sb->s_blocksize - 1))
-+ {
-+ extoffset -= adsize;
-+ elen = EXT_RECORDED_ALLOCATED |
-+ ((elen + inode->i_sb->s_blocksize - 1) &
-+ ~(inode->i_sb->s_blocksize - 1));
-+ udf_write_aext(inode, bloc, &extoffset, eloc, elen, bh, 1);
-+ }
-+ memset(&eloc, 0x00, sizeof(kernel_lb_addr));
-+ elen = EXT_NOT_RECORDED_NOT_ALLOCATED | offset;
-+ udf_add_aext(inode, &bloc, &extoffset, eloc, elen, &bh, 1);
- }
-- memset(&eloc, 0x00, sizeof(kernel_lb_addr));
-- elen = EXT_NOT_RECORDED_NOT_ALLOCATED | offset;
-- udf_add_aext(inode, &bloc, &extoffset, eloc, elen, &bh, 1);
- }
- }
- }