Skip to content

Commit

Permalink
Merge branch 'systemd-security/coredump-capabilities'
Browse files Browse the repository at this point in the history
CVE-2022-4415: systemd: coredump not respecting fs.suid_dumpable kernel setting
Affects systemd >= 247 with libacl support enabled.

This is a merge of systemd/systemd-security#12.
I'm doing the merge locally because github doesn't support merging directly
from systemd/systemd-security to systemd/systemd.
  • Loading branch information
keszybz committed Dec 20, 2022
2 parents f206809 + 3e4d0f6 commit b764142
Show file tree
Hide file tree
Showing 2 changed files with 220 additions and 41 deletions.
9 changes: 9 additions & 0 deletions src/basic/io-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,16 @@ struct iovec_wrapper *iovw_new(void);
struct iovec_wrapper *iovw_free(struct iovec_wrapper *iovw);
struct iovec_wrapper *iovw_free_free(struct iovec_wrapper *iovw);
void iovw_free_contents(struct iovec_wrapper *iovw, bool free_vectors);

int iovw_put(struct iovec_wrapper *iovw, void *data, size_t len);
static inline int iovw_consume(struct iovec_wrapper *iovw, void *data, size_t len) {
/* Move data into iovw or free on error */
int r = iovw_put(iovw, data, len);
if (r < 0)
free(data);
return r;
}

int iovw_put_string_field(struct iovec_wrapper *iovw, const char *field, const char *value);
int iovw_put_string_field_free(struct iovec_wrapper *iovw, const char *field, char *value);
void iovw_rebase(struct iovec_wrapper *iovw, char *old, char *new);
Expand Down
Loading

0 comments on commit b764142

Please sign in to comment.