diff options
| -rw-r--r-- | recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-Fix-buffer-overflow-on-workdir-path.patch | 32 | ||||
| -rw-r--r-- | recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-utils-Add-missing-include-on-limits.h.patch | 36 | ||||
| -rw-r--r-- | recipes-extended/fuse-overlayfs/fuse-overlayfs_1.9.bb (renamed from recipes-extended/fuse-overlayfs/fuse-overlayfs_0.6.4.bb) | 4 |
3 files changed, 38 insertions, 34 deletions
diff --git a/recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-Fix-buffer-overflow-on-workdir-path.patch b/recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-Fix-buffer-overflow-on-workdir-path.patch deleted file mode 100644 index 129423d4..00000000 --- a/recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-Fix-buffer-overflow-on-workdir-path.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | From 7e5992d6121aed0cfcbfaf70472f28d87cff1426 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
| 3 | Date: Mon, 11 Jul 2022 20:36:06 +0200 | ||
| 4 | Subject: [PATCH] Fix buffer overflow on workdir path | ||
| 5 | |||
| 6 | We make sure that the path used for workdir is reallocated before | ||
| 7 | appending. This was initially included in upstream as part of | ||
| 8 | https://github.com/containers/fuse-overlayfs/commit/d5b725b6f18a437db66bfc1456d04c3bf658f66a. | ||
| 9 | |||
| 10 | Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
| 11 | Upstream-Status: Backport | ||
| 12 | --- | ||
| 13 | main.c | 3 +++ | ||
| 14 | 1 file changed, 3 insertions(+) | ||
| 15 | |||
| 16 | diff --git a/main.c b/main.c | ||
| 17 | index e5bdda1..118a6cb 100644 | ||
| 18 | --- a/main.c | ||
| 19 | +++ b/main.c | ||
| 20 | @@ -5039,6 +5039,9 @@ main (int argc, char *argv[]) | ||
| 21 | if (path == NULL) | ||
| 22 | goto err_out1; | ||
| 23 | mkdir (path, 0700); | ||
| 24 | + path = realloc(path, strlen(path)+strlen("/work")+1); | ||
| 25 | + if (!path) | ||
| 26 | + error (EXIT_FAILURE, errno, "allocating workdir path"); | ||
| 27 | strcat (path, "/work"); | ||
| 28 | mkdir (path, 0700); | ||
| 29 | free (lo.workdir); | ||
| 30 | -- | ||
| 31 | 2.25.1 | ||
| 32 | |||
diff --git a/recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-utils-Add-missing-include-on-limits.h.patch b/recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-utils-Add-missing-include-on-limits.h.patch new file mode 100644 index 00000000..cd504ce5 --- /dev/null +++ b/recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-utils-Add-missing-include-on-limits.h.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From b48e958aaecfdfc3bb48db082a548a09d6487181 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
| 3 | Date: Wed, 13 Jul 2022 12:05:07 +0200 | ||
| 4 | Subject: [PATCH] utils: Add missing include on limits.h | ||
| 5 | |||
| 6 | This happens to not be an issue with glibc because it gets indirectly | ||
| 7 | included via dirent.h: | ||
| 8 | |||
| 9 | .. /usr/include/dirent.h | ||
| 10 | [...] | ||
| 11 | ..... /usr/include/linux/limits.h | ||
| 12 | |||
| 13 | When using the musl libc implementation, that is not the case anymore | ||
| 14 | and the build fails. | ||
| 15 | |||
| 16 | Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
| 17 | Upstream-Status: Submitted [https://github.com/containers/fuse-overlayfs/pull/362] | ||
| 18 | --- | ||
| 19 | utils.h | 1 + | ||
| 20 | 1 file changed, 1 insertion(+) | ||
| 21 | |||
| 22 | diff --git a/utils.h b/utils.h | ||
| 23 | index 13a177e..6fbc328 100644 | ||
| 24 | --- a/utils.h | ||
| 25 | +++ b/utils.h | ||
| 26 | @@ -32,6 +32,7 @@ | ||
| 27 | # include <sys/types.h> | ||
| 28 | # include <fcntl.h> | ||
| 29 | # include "fuse-overlayfs.h" | ||
| 30 | +# include <limits.h> | ||
| 31 | |||
| 32 | # define XATTR_OVERRIDE_STAT "user.fuseoverlayfs.override_stat" | ||
| 33 | # define XATTR_PRIVILEGED_OVERRIDE_STAT "security.fuseoverlayfs.override_stat" | ||
| 34 | -- | ||
| 35 | 2.25.1 | ||
| 36 | |||
diff --git a/recipes-extended/fuse-overlayfs/fuse-overlayfs_0.6.4.bb b/recipes-extended/fuse-overlayfs/fuse-overlayfs_1.9.bb index 4f793bd9..31199928 100644 --- a/recipes-extended/fuse-overlayfs/fuse-overlayfs_0.6.4.bb +++ b/recipes-extended/fuse-overlayfs/fuse-overlayfs_1.9.bb | |||
| @@ -5,10 +5,10 @@ containers." | |||
| 5 | LICENSE = "GPL-3.0-or-later" | 5 | LICENSE = "GPL-3.0-or-later" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 7 | 7 | ||
| 8 | SRCREV = "098d9ad79fdbb8538adde08628408aa32a8b4b17" | 8 | SRCREV = "51592ea406f48faeccab288f65dcba6c4a67cd90" |
| 9 | SRC_URI = " \ | 9 | SRC_URI = " \ |
| 10 | git://github.com/containers/fuse-overlayfs.git;nobranch=1;protocol=https \ | 10 | git://github.com/containers/fuse-overlayfs.git;nobranch=1;protocol=https \ |
| 11 | file://0001-Fix-buffer-overflow-on-workdir-path.patch \ | 11 | file://0001-utils-Add-missing-include-on-limits.h.patch \ |
| 12 | " | 12 | " |
| 13 | 13 | ||
| 14 | DEPENDS = "fuse3" | 14 | DEPENDS = "fuse3" |
