platform/upstream/e2fsprogs.git
10 months agoe2fsck: abort if there is a corrupted directory block when rehashing 69/294669/1 accepted/tizen_6.0_base accepted/tizen_6.0_base_tool tizen_6.0_base accepted/tizen/6.0/base/20230713.142821 accepted/tizen/6.0/base/tool/20230710.095805 submit/tizen_6.0_base/20230705.092351
Theodore Ts'o [Fri, 20 Dec 2019 00:37:34 +0000 (19:37 -0500)]
e2fsck: abort if there is a corrupted directory block when rehashing

In e2fsck pass 3a, when we are rehashing directories, at least in
theory, all of the directories should have had corruptions with
respect to directory entry structure fixed.  However, it's possible
(for example, if the user declined a fix) that we can reach this stage
of processing with a corrupted directory entries.

So check for that case and don't try to process a corrupted directory
block so we don't run into trouble in mutate_name() if there is a
zero-length file name.

Change-Id: I41bc9752d8c0dc72956e39a45d8380b5d9375161
Addresses: TALOS-2019-0973
Addresses: CVE-2019-5188
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Origin: upstream, https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=8dd73c149f418238f19791f9d666089ef9734dff
Signed-off-by: Krystian Czapiga <k.czapiga@samsung.com>
10 months agolibsupport: add checks to prevent buffer overrun bugs in quota code 68/294668/1
Theodore Ts'o [Sun, 1 Sep 2019 04:59:16 +0000 (00:59 -0400)]
libsupport: add checks to prevent buffer overrun bugs in quota code

A maliciously corrupted file systems can trigger buffer overruns in
the quota code used by e2fsck.  To fix this, add sanity checks to the
quota header fields as well as to block number references in the quota
tree.

Change-Id: If14fe3f6f647368fbd874de12f6cdca8cc4ab0f2
Addresses: CVE-2019-5094
Addresses: TALOS-2019-0887
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Origin: upstream, https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=8dbe7b475ec5e91ed767239f0e85880f416fc384
Signed-off-by: Krystian Czapiga <k.czapiga@samsung.com>
4 years agomisc: rename copy_file_range to copy_file_chunk 30/220030/2 accepted/tizen_6.0_base_tool_hotfix tizen_6.0_base_hotfix accepted/tizen/6.0/base/20201029.110439 accepted/tizen/6.0/base/tool/20201029.111935 accepted/tizen/6.0/base/tool/hotfix/20201030.124750 accepted/tizen/6.0/base/tool/hotfix/20201102.085930 accepted/tizen/base/20200113.064839 submit/tizen_6.0_base/20201029.184801 submit/tizen_6.0_base_hotfix/20201030.192501 submit/tizen_6.0_base_hotfix/20201102.162701 submit/tizen_base/20200108.045102 tizen_6.0.m2_release
Palmer Dabbelt [Fri, 29 Dec 2017 18:19:51 +0000 (10:19 -0800)]
misc: rename copy_file_range to copy_file_chunk

As of 2.27, glibc will have a copy_file_range library call to wrap the
new copy_file_range system call.  This conflicts with the function in
misc/create_inode.c, which this patch renames _copy_file_range.

Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 01551bdba16ab16512a01affe02ade32c41ede8a)

Change-Id: I7cea55432515e292356374e1fdc7a369ea7f6fb7

4 years agoinclude sys/sysmacros.h as needed 72/221372/1
Mike Frysinger [Fri, 19 May 2017 17:25:59 +0000 (13:25 -0400)]
include sys/sysmacros.h as needed

The minor/major/makedev macros are not entirely standard.  glibc has had
the definitions in sys/sysmacros.h since the start, and wants to move away
from always defining them implicitly via sys/types.h (as this pollutes the
namespace in violation of POSIX).  Other C libraries have already dropped
them.  Since the configure script already checks for this header, use that
to pull in the header in files that use these macros.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 3fb715b55426875902dfef3056b2cf7335953178)

Change-Id: If05342f36613523bcb93e010c23f3c33a22fe07a

6 years agohardening_checker: to fix No RELOP option 75/167675/1 accepted/tizen_5.0_base accepted/tizen_5.5_base accepted/tizen_5.5_base_mobile_hotfix accepted/tizen_5.5_base_wearable_hotfix tizen_5.0_base tizen_5.5_base tizen_5.5_base_mobile_hotfix tizen_5.5_base_wearable_hotfix tizen_5.5_tv accepted/tizen/5.0/base/20181101.091021 accepted/tizen/5.5/base/20191030.083921 accepted/tizen/5.5/base/mobile/hotfix/20201023.085547 accepted/tizen/5.5/base/wearable/hotfix/20201023.081730 accepted/tizen/base/20180406.180248 submit/tizen_5.0_base/20181101.000001 submit/tizen_5.5_base/20191030.000001 submit/tizen_5.5_base_mobile_hotfix/20201023.171501 submit/tizen_5.5_base_wearable_hotfix/20201023.155601 submit/tizen_base/20180119.073025 submit/tizen_base/20180403.030132 tizen_5.5.m2_release
lokilee73 [Fri, 19 Jan 2018 07:23:46 +0000 (16:23 +0900)]
hardening_checker: to fix No RELOP option

Change-Id: I8c8ed1ff45893d6218129840e4f0f777fc951564
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agorevert "resize2fs: fix overly-pessimistic calculation of minimum size required" 10/143510/1 accepted/tizen_4.0_base accepted/tizen/4.0/base/20170828.221306 accepted/tizen/base/20170814.055754 submit/tizen_4.0_base/20170828.000000 submit/tizen_4.0_base/20170828.000001 submit/tizen_base/20170811.072713 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release
Yunmi Ha [Thu, 10 Aug 2017 07:17:22 +0000 (16:17 +0900)]
revert "resize2fs: fix overly-pessimistic calculation of minimum size required"

resize2fs: fix overly-pessimistic calculation of minimum size required

For extent-mapped file systems, we need to reserve some extra space in
case we need to grow the extent tree.  Calculate the safety margin
more intelligently, so we don't overestimate the amount of space
required.
(https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=b4f30fcfe66c76a95689b9a39c229cef2446b385)

This patch increased start block for reserving margin
so it sometimes failed to resize when filesystem is very small.
(error message - resize2fs: No space left on device while trying to
 resize csc.img)

Therefore, it is only available in the extent-mapped file system.
We can't use this patch.

Change-Id: I5783fe33dd000717828a361ecb628d5750b39940
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
6 years agoEnable ASLR/DEP feature 23/135123/2
Yunmi Ha [Wed, 21 Jun 2017 04:38:45 +0000 (13:38 +0900)]
Enable ASLR/DEP feature

Change-Id: Ie191c0ca235d10481e7af6e063711500387d9589
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
6 years agopackaging: restore -fcommon for ASan build 31/134931/1 accepted/tizen/4.0/base/20170811.092958 accepted/tizen/base/20170707.183310 submit/tizen_4.0_base/20170811.071500 submit/tizen_base/20170621.021749 submit/tizen_base/20170705.023439 submit/tizen_base/20170705.023753
Slava Barinov [Fri, 14 Apr 2017 10:24:08 +0000 (13:24 +0300)]
packaging: restore -fcommon for ASan build

Change-Id: Ia60a98c56205ff0f6af0801c097f24c4ef0c5488
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
6 years agoUpdate package version 1.43.4 22/134922/1
Yunmi Ha [Tue, 20 Jun 2017 08:51:47 +0000 (17:51 +0900)]
Update package version 1.43.4

For support address sanitizer function,
need to update the package version.

Change-Id: Ic9afac3d0804a74b7e017d4a2716f8db7ab4eb0a
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
6 years agoInstall license file to /usr/share/licenses
Yunmi Ha [Tue, 28 Mar 2017 05:09:42 +0000 (14:09 +0900)]
Install license file to /usr/share/licenses

Need to install license file per each rpm package.
Add license file to libcom_err and libext2fs packages.

Change-Id: Id8baaa189a7d74417921b90f4ed0607e64a7eaa5
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
6 years agolicense:change license from BSD2.0 to BSD-3-Clause
silas jeon [Wed, 21 Sep 2016 06:47:12 +0000 (15:47 +0900)]
license:change license from BSD2.0 to BSD-3-Clause

Change-Id: I5dc28aae215530c74286ef689659897cdfc671ed

6 years agoUpdate 1.42.13 version
Yunmi Ha [Wed, 25 May 2016 02:11:42 +0000 (11:11 +0900)]
Update 1.42.13 version

For applying CVE patch (CVE-2015-1572), opensource version update.

Change-Id: I5f1cf3ffa38a1d11018291876853eeec405554ec
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
6 years agospec: change license name
boseong choi [Fri, 18 Mar 2016 11:10:58 +0000 (20:10 +0900)]
spec: change license name

e2fsprogs license : GPLv2 -> GPL-2.0
uuidd license : GPLv2 -> BSD-2.0
add license document for MIT

Change-Id: Ic31306143ad5d44e34a5c0d88644e90b584c70e0
Signed-off-by: boseong choi <boseong.choi@samsung.com>
6 years agoresize2fs: fix minimum required blocks for flex_bg file systems
Taeyoung Kim [Fri, 4 Dec 2015 08:27:05 +0000 (17:27 +0900)]
resize2fs: fix minimum required blocks for flex_bg file systems

- This patch makes the image size lesser

Change-Id: Iadc3ece593e0418c651e6c9d20d4aed160550787
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
6 years agomke2fs.8.in: update the manual for the -d option
Robert Yang [Thu, 6 Mar 2014 16:00:25 +0000 (11:00 -0500)]
mke2fs.8.in: update the manual for the -d option

Update the manual for the -d option

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
6 years agopackaging: update 1.42.11 and fix group tag
Chanho Park [Tue, 5 Aug 2014 02:48:30 +0000 (11:48 +0900)]
packaging: update 1.42.11 and fix group tag

Change-Id: I75e18bb295b61630afcda6cb4514d873387cc81b
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
6 years agopackaging: eliminate removing quata files
Chanho Park [Tue, 8 Jul 2014 14:17:23 +0000 (23:17 +0900)]
packaging: eliminate removing quata files

Change-Id: I368c835deb2d17421d4e558ea50e1a94d4318206
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
6 years agoMoved RELEASE-NOTES and README to doc subpackage
Jacek Bukarewicz [Tue, 10 Sep 2013 13:52:23 +0000 (15:52 +0200)]
Moved RELEASE-NOTES and README to doc subpackage

Change-Id: I25702f4d04b1a642335a3d3c5c905416106a1fb1
Signed-off-by: Jacek Bukarewicz <j.bukarewicz@samsung.com>
6 years agoresetting manifest requested domain to floor
Alexandru Cornea [Fri, 28 Jun 2013 18:40:44 +0000 (21:40 +0300)]
resetting manifest requested domain to floor

6 years agoset %license correctly
Anas Nashif [Sat, 11 May 2013 06:00:01 +0000 (02:00 -0400)]
set %license correctly

6 years agoSet license using %license
Anas Nashif [Sat, 11 May 2013 05:39:47 +0000 (01:39 -0400)]
Set license using %license

6 years agodelete .a files
Anas Nashif [Sat, 22 Dec 2012 04:46:21 +0000 (20:46 -0800)]
delete .a files

6 years agoUpdate to 1.42.6
Anas Nashif [Sat, 22 Dec 2012 04:43:55 +0000 (20:43 -0800)]
Update to 1.42.6

6 years agoadd packaging
Anas Nashif [Fri, 14 Dec 2012 21:27:03 +0000 (13:27 -0800)]
add packaging

6 years agodo not ignore spec
Anas Nashif [Mon, 5 Nov 2012 01:14:56 +0000 (17:14 -0800)]
do not ignore spec

6 years agodo not ignore spec
Anas Nashif [Mon, 5 Nov 2012 01:14:40 +0000 (17:14 -0800)]
do not ignore spec

6 years agocleanup spec
Anas Nashif [Mon, 5 Nov 2012 01:09:52 +0000 (17:09 -0800)]
cleanup spec

6 years agoadd packaging
Anas Nashif [Sun, 4 Nov 2012 20:39:41 +0000 (12:39 -0800)]
add packaging

6 years agoImported Upstream version 1.43.4 84/134584/1 upstream/1.43.4
Yunmi Ha [Mon, 19 Jun 2017 09:07:27 +0000 (18:07 +0900)]
Imported Upstream version 1.43.4

Change-Id: I7c0c290f81a2ed0b3f23005681c037f4fa7c840a

7 years agoImported Upstream version 1.42.13 48/69648/1 upstream/1.42.13
Yunmi Ha [Mon, 16 May 2016 08:47:22 +0000 (17:47 +0900)]
Imported Upstream version 1.42.13

Change-Id: I6106b3e0c2b3acd33a7ca9b9f55bb8e2e2f884a1

9 years agoImported Upstream version 1.42.11 upstream/1.42.11
Chanho Park [Tue, 5 Aug 2014 02:52:45 +0000 (11:52 +0900)]
Imported Upstream version 1.42.11

9 years agoImported Upstream version 1.42.10 upstream/1.42.10
Chanho Park [Tue, 8 Jul 2014 10:34:47 +0000 (19:34 +0900)]
Imported Upstream version 1.42.10

11 years agoImported Upstream version 1.42.6 upstream/1.42.6
Anas Nashif [Mon, 5 Nov 2012 01:05:14 +0000 (17:05 -0800)]
Imported Upstream version 1.42.6

11 years agoImported Upstream version 1.42.4 upstream/1.42.4
Anas Nashif [Sun, 4 Nov 2012 20:39:39 +0000 (12:39 -0800)]
Imported Upstream version 1.42.4