summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch24
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch48
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch2
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch6
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.2.bb (renamed from meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.1.bb)4
5 files changed, 79 insertions, 5 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch
new file mode 100644
index 0000000000..26f972b313
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch
@@ -0,0 +1,24 @@
1From 42ba67f9a51ef959e7fd8dac29b5398c121c6976 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 30 Apr 2021 23:45:56 +0200
4Subject: [PATCH] lib/ext2fs/unix_io.c: do unlock on error
5
6Upstream-Status: Submitted [https://github.com/tytso/e2fsprogs/pull/68]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 lib/ext2fs/unix_io.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
13index 64eee342..528c2fbc 100644
14--- a/lib/ext2fs/unix_io.c
15+++ b/lib/ext2fs/unix_io.c
16@@ -398,7 +398,7 @@ static errcode_t raw_write_blk(io_channel channel,
17 mutex_lock(data, BOUNCE_MTX);
18 if (ext2fs_llseek(data->dev, location, SEEK_SET) < 0) {
19 retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
20- goto error_out;
21+ goto error_unlock;
22 }
23 actual = write(data->dev, buf, size);
24 mutex_unlock(data, BOUNCE_MTX);
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch
new file mode 100644
index 0000000000..2452f7e08e
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch
@@ -0,0 +1,48 @@
1From 3593063f735f453d43f461292e26913436c11ca3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Sat, 1 May 2021 13:06:12 +0200
4Subject: [PATCH] lib/ext2fs/unix_io.c: revert parts of "libext2fs: fix
5 potential races in unix_io"
6
7Upstream-Status: Submitted [https://github.com/tytso/e2fsprogs/pull/68]
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9---
10 lib/ext2fs/unix_io.c | 15 ++++++++-------
11 1 file changed, 8 insertions(+), 7 deletions(-)
12
13diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
14index 528c2fbc..f4916b21 100644
15--- a/lib/ext2fs/unix_io.c
16+++ b/lib/ext2fs/unix_io.c
17@@ -311,10 +311,10 @@ bounce_read:
18 size += really_read;
19 goto short_read;
20 }
21- actual = size;
22- if (actual > align_size)
23- actual = align_size;
24- actual -= offset;
25+ if ((actual + offset) > align_size)
26+ actual = align_size - offset;
27+ if (actual > size)
28+ actual = size;
29 memcpy(buf, data->bounce + offset, actual);
30
31 really_read += actual;
32@@ -455,9 +455,10 @@ bounce_write:
33 }
34 }
35 actual = size;
36- if (actual > align_size)
37- actual = align_size;
38- actual -= offset;
39+ if ((actual + offset) > align_size)
40+ actual = align_size - offset;
41+ if (actual > size)
42+ actual = size;
43 memcpy(((char *)data->bounce) + offset, buf, actual);
44 if (ext2fs_llseek(data->dev, aligned_blk * align_size, SEEK_SET) < 0) {
45 retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
46--
472.24.0
48
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
index d7c07c3b0f..e8b2aafbf3 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
@@ -1,4 +1,4 @@
1From 9263b8764702f2b26ddaaf80808ebab31a1dba3b Mon Sep 17 00:00:00 2001 1From 8957443bcbea43685c76eb3cbc5009f7fd529283 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com> 2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Wed, 10 Aug 2016 11:19:44 +0800 3Date: Wed, 10 Aug 2016 11:19:44 +0800
4Subject: [PATCH] Fix missing check for permission denied. 4Subject: [PATCH] Fix missing check for permission denied.
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
index 88d0ae77c9..96eb7f20df 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
@@ -1,4 +1,4 @@
1From 6e4c1644a3a8cacf7c1f5953cc378589bb046d5a Mon Sep 17 00:00:00 2001 1From 3b75308cc75adc249db6ca36e42fe93309b9a018 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com> 2From: Ross Burton <ross.burton@intel.com>
3Date: Mon, 23 Dec 2013 13:38:34 +0000 3Date: Mon, 23 Dec 2013 13:38:34 +0000
4Subject: [PATCH] e2fsprogs: silence debugfs 4Subject: [PATCH] e2fsprogs: silence debugfs
@@ -14,10 +14,10 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
14 1 file changed, 1 insertion(+), 1 deletion(-) 14 1 file changed, 1 insertion(+), 1 deletion(-)
15 15
16diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c 16diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
17index 132c5f9d..98063727 100644 17index b67a88bc..76dd5556 100644
18--- a/debugfs/debugfs.c 18--- a/debugfs/debugfs.c
19+++ b/debugfs/debugfs.c 19+++ b/debugfs/debugfs.c
20@@ -2510,7 +2510,7 @@ static int source_file(const char *cmd_file, int ss_idx) 20@@ -2518,7 +2518,7 @@ static int source_file(const char *cmd_file, int ss_idx)
21 cp = strchr(buf, '\r'); 21 cp = strchr(buf, '\r');
22 if (cp) 22 if (cp)
23 *cp = 0; 23 *cp = 0;
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.1.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.2.bb
index be8b67c35d..fc022f37de 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.1.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.2.bb
@@ -4,6 +4,8 @@ SRC_URI += "file://remove.ldconfig.call.patch \
4 file://run-ptest \ 4 file://run-ptest \
5 file://ptest.patch \ 5 file://ptest.patch \
6 file://mkdir_p.patch \ 6 file://mkdir_p.patch \
7 file://0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch \
8 file://0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch \
7 " 9 "
8 10
9SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \ 11SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \
@@ -11,7 +13,7 @@ SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permissio
11" 13"
12 14
13 15
14SRCREV = "3114c623f56b0d61f5f34b85f7b23d28f6c848c0" 16SRCREV = "1eea0e2bd9a6760ebad834d5d2cf700fffe5ebe2"
15UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$" 17UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
16 18
17EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \ 19EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \