aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris D. Faulhaber <jedgar@FreeBSD.org>2002-07-31 17:55:22 +0000
committerChris D. Faulhaber <jedgar@FreeBSD.org>2002-07-31 17:55:22 +0000
commit27d2299a89ea116bc0ff84fe0cd3afc9a6b7b648 (patch)
tree0f78d4cfc17f428bc608581db07955d292892a10
parentb63cf0aacf897b115182a73c40660748f93b3abb (diff)
downloadsrc-27d2299a89ea116bc0ff84fe0cd3afc9a6b7b648.tar.gz
src-27d2299a89ea116bc0ff84fe0cd3afc9a6b7b648.zip
Correct bounds checking error in FFS filesize limits.
Notes
Notes: svn path=/releng/4.4/; revision=101098
-rw-r--r--UPDATING3
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c3
3 files changed, 7 insertions, 1 deletions
diff --git a/UPDATING b/UPDATING
index 7aa76b02071e..d68fefaf933f 100644
--- a/UPDATING
+++ b/UPDATING
@@ -17,6 +17,9 @@ minimal number of processes, if possible, for that patch. For those
updates that don't have an advisory, or to be safe, you can do a full
build and install as described in the COMMON ITEMS section.
+20020731: p21
+ A bounds checking error in FFS filesize limits was corrected.
+
20020731: p20
Upgrade to OpenSSL 0.9.6e.
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 52a59c5a9896..fa7ad33f6339 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -36,7 +36,7 @@
TYPE="FreeBSD"
REVISION="4.4"
-BRANCH="RELEASE-p20"
+BRANCH="RELEASE-p21"
RELEASE="${REVISION}-${BRANCH}"
VERSION="${TYPE} ${RELEASE}"
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index f8552bb50197..a5bfb4cd9485 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -734,6 +734,9 @@ ffs_mountfs(devvp, mp, p, malloctype)
ump->um_savedmaxfilesize = fs->fs_maxfilesize; /* XXX */
maxfilesize = (u_int64_t)0x40000000 * fs->fs_bsize - 1; /* XXX */
+ /* Enforce limit caused by vm object backing (32 bits vm_pindex_t). */
+ if (maxfilesize > (u_int64_t)0x80000000u * PAGE_SIZE - 1)
+ maxfilesize = (u_int64_t)0x80000000u * PAGE_SIZE - 1;
if (fs->fs_maxfilesize > maxfilesize) /* XXX */
fs->fs_maxfilesize = maxfilesize; /* XXX */
if (ronly == 0) {