From e751b54b584c74fd3255de911a22fcdeacea1944 Mon Sep 17 00:00:00 2001 From: Anton Altaparmakov Date: Thu, 2 May 2002 13:10:56 +0100 Subject: [PATCH] NTFS: 2.0.5 release. Major buffer overflow fix in extent inode handling. Upgrade is imperative! --- fs/ntfs/ChangeLog | 14 +++++++++++++- fs/ntfs/Makefile | 2 +- fs/ntfs/mft.c | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index 47d0894da3a4..b6243c47d755 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog @@ -27,6 +27,18 @@ ToDo: quite big. Modularising them a bit, e.g. a-la get_block(), will make them cleaner and make code reuse easier. +2.0.5 - Major bugfix. Buffer overflow in extent inode handling. + + - No need to set old blocksize in super.c::ntfs_fill_super() as the + VFS does so via invocation of deactivate_super() calling + fs->fill_super() calling block_kill_super() which does it. + - BKL moved from VFS into dir.c::ntfs_readdir(). (Linus Torvalds) + -> Do we really need it? I don't think so as we have exclusion on + the directory ntfs_inode rw_semaphore mrec_lock. We mmight have to + move the ->f_pos accesses under the mrec_lock though. Check this... + - Fix really, really, really stupid buffer overflow in extent inode + handling in mft.c::map_extent_mft_record(). + 2.0.4 - Cleanups and updates for kernel 2.5.11. - Add documentation on how to use the MD driver to be able to use NTFS @@ -35,7 +47,7 @@ ToDo: Remove all uses of kdev_t in favour of struct block_device *: - Change compress.c::ntfs_file_read_compressed_block() to use sb_getblk() instead of getblk(). - - Change super.c::ntfs_fill_suoer() to use bdev_hardsect_size() instead + - Change super.c::ntfs_fill_super() to use bdev_hardsect_size() instead of get_hardsect_size(). - No need to get old blocksize in super.c::ntfs_fill_super() as fs/super.c::get_sb_bdev() already does this. diff --git a/fs/ntfs/Makefile b/fs/ntfs/Makefile index b78f732ae734..e158bc7d2874 100644 --- a/fs/ntfs/Makefile +++ b/fs/ntfs/Makefile @@ -7,7 +7,7 @@ obj-y := aops.o attrib.o compress.o debug.o dir.o file.o inode.o mft.o \ obj-m := $(O_TARGET) -EXTRA_CFLAGS = -DNTFS_VERSION=\"2.0.4\" +EXTRA_CFLAGS = -DNTFS_VERSION=\"2.0.5\" ifeq ($(CONFIG_NTFS_DEBUG),y) EXTRA_CFLAGS += -DDEBUG diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index 016054181094..d7c7177c9802 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c @@ -459,7 +459,7 @@ map_err_out: goto unm_err_out; } /* Attach extent inode to base inode, reallocating memory if needed. */ - if (!(base_ni->nr_extents & ~3)) { + if (!(base_ni->nr_extents & 3)) { ntfs_inode **tmp; int new_size = (base_ni->nr_extents + 4) * sizeof(ntfs_inode *); -- 2.39.5