diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/pseudo/files/xattr_fix.patch | 40 | ||||
-rw-r--r-- | meta/recipes-devtools/pseudo/pseudo_git.bb | 1 |
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pseudo/files/xattr_fix.patch b/meta/recipes-devtools/pseudo/files/xattr_fix.patch new file mode 100644 index 0000000000..61d0030b10 --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/xattr_fix.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | |||
2 | In the xattr handling functions, if result is NULL, which it can be | ||
3 | with the path ignore code, there is a NULL pointer dereference and | ||
4 | segfault. Everywhere else checks result first, this appears to just | ||
5 | be an omission. | ||
6 | |||
7 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Index: git/ports/linux/xattr/pseudo_wrappers.c | ||
11 | =================================================================== | ||
12 | --- git.orig/ports/linux/xattr/pseudo_wrappers.c | ||
13 | +++ git/ports/linux/xattr/pseudo_wrappers.c | ||
14 | @@ -134,7 +134,7 @@ static ssize_t shared_getxattr(const cha | ||
15 | pseudo_debug(PDBGF_XATTR, "getxattr(%s [fd %d], %s)\n", | ||
16 | path ? path : "<no path>", fd, name); | ||
17 | pseudo_msg_t *result = pseudo_client_op(OP_GET_XATTR, 0, fd, -1, path, &buf, name); | ||
18 | - if (result->result != RESULT_SUCCEED) { | ||
19 | + if (!result || result->result != RESULT_SUCCEED) { | ||
20 | errno = ENOATTR; | ||
21 | return -1; | ||
22 | } | ||
23 | @@ -254,7 +254,7 @@ static int shared_setxattr(const char *p | ||
24 | static ssize_t shared_listxattr(const char *path, int fd, char *list, size_t size) { | ||
25 | RC_AND_BUF | ||
26 | pseudo_msg_t *result = pseudo_client_op(OP_LIST_XATTR, 0, fd, -1, path, &buf); | ||
27 | - if (result->result != RESULT_SUCCEED) { | ||
28 | + if (!result || result->result != RESULT_SUCCEED) { | ||
29 | pseudo_debug(PDBGF_XATTR, "listxattr: no success.\n"); | ||
30 | errno = ENOATTR; | ||
31 | return -1; | ||
32 | @@ -276,7 +276,7 @@ static int shared_removexattr(const char | ||
33 | RC_AND_BUF | ||
34 | pseudo_msg_t *result = pseudo_client_op(OP_REMOVE_XATTR, 0, fd, -1, path, &buf, name); | ||
35 | |||
36 | - if (result->result != RESULT_SUCCEED) { | ||
37 | + if (!result || result->result != RESULT_SUCCEED) { | ||
38 | /* docs say ENOATTR, but I don't have one */ | ||
39 | errno = ENOENT; | ||
40 | return -1; | ||
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index a5e79ec9a5..7857b4f1b1 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb | |||
@@ -6,6 +6,7 @@ SRC_URI = "git://git.yoctoproject.org/pseudo;branch=oe-core \ | |||
6 | file://add_ignore_paths.patch \ | 6 | file://add_ignore_paths.patch \ |
7 | file://abort_on_mismatch.patch \ | 7 | file://abort_on_mismatch.patch \ |
8 | file://track_link_fds.patch \ | 8 | file://track_link_fds.patch \ |
9 | file://xattr_fix.patch \ | ||
9 | file://fallback-passwd \ | 10 | file://fallback-passwd \ |
10 | file://fallback-group \ | 11 | file://fallback-group \ |
11 | " | 12 | " |