Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/bluez:20/fix-obexd-crash into ~snappy-hwe-team/snappy-hwe-snaps/+git/bluez:snap-20

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: cbd67788a108e08ba2e25b7895b82c27702e9b5c
Merged at revision: e5b5efce161d159c0f4c73ffcf2070061c0502fc
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/bluez:20/fix-obexd-crash
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/bluez:snap-20
Diff against target: 37 lines (+31/-0)
1 file modified
patch/0005-obexd-don-t-free-environment-variable.patch (+31/-0)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Review via email: mp+395128@code.launchpad.net

Commit message

* Fix obexd crash (LP#1907498) - thanks Dan Dedrick
* Rebuild to fix CVE-2020-27348 (see https://ubuntu.com/security/notices/USN-4661-1)

Description of the change

* Fix obexd crash (LP#1907498) - thanks Dan Dedrick
* Rebuild to fix CVE-2020-27348 (see https://ubuntu.com/security/notices/USN-4661-1)

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :

PASSED: Successfully build documentation, rev: cbd67788a108e08ba2e25b7895b82c27702e9b5c

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/1375/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/patch/0005-obexd-don-t-free-environment-variable.patch b/patch/0005-obexd-don-t-free-environment-variable.patch
2new file mode 100644
3index 0000000..c66c68d
4--- /dev/null
5+++ b/patch/0005-obexd-don-t-free-environment-variable.patch
6@@ -0,0 +1,31 @@
7+From 8ef25c6ffef5786529b6dd292f6f5597c1dbfd4f Mon Sep 17 00:00:00 2001
8+From: Dan Dedrick <dan_dedrick@jabil.com>
9+Date: Wed, 9 Dec 2020 11:57:36 -0500
10+Subject: [PATCH] obexd: don't free environment variable
11+
12+Use g_strdup for option_root since it is expected to be freeable. When
13+this was assigned to an environement variable it would then be passed to
14+g_free and cause a crash because it wasn't memory that had been
15+malloced.
16+---
17+ obexd/src/main.c | 4 +++-
18+ 1 file changed, 3 insertions(+), 1 deletion(-)
19+
20+diff --git a/obexd/src/main.c b/obexd/src/main.c
21+index 118b5a1a9..ddea9fbd5 100644
22+--- a/obexd/src/main.c
23++++ b/obexd/src/main.c
24+@@ -285,7 +285,9 @@ int main(int argc, char *argv[])
25+ }
26+
27+ if (option_root == NULL) {
28+- option_root = getenv("SNAP_USER_DATA");
29++ const char * root_env = getenv("SNAP_USER_DATA");
30++ if (root_env)
31++ option_root = g_strdup(root_env);
32+
33+ if (!option_root)
34+ option_root = g_build_filename(g_get_user_cache_dir(),
35+--
36+2.29.2
37+

Subscribers

People subscribed via source and target branches