Merge ~ahasenack/ubuntu/+source/nfs-utils:kinetic-blkmapd-invalid-free into ubuntu/+source/nfs-utils:ubuntu/kinetic-devel

Proposed by Andreas Hasenack
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merged at revision: 7954eacfc92db1dc3d48a5f2f31a4661dfe1e20d
Proposed branch: ~ahasenack/ubuntu/+source/nfs-utils:kinetic-blkmapd-invalid-free
Merge into: ubuntu/+source/nfs-utils:ubuntu/kinetic-devel
Diff against target: 69 lines (+47/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/blkmapd-fix-invalid-free.patch (+39/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Bryce Harrington (community) Approve
Canonical Server Reporter Pending
Review via email: mp+431926@code.launchpad.net

Description of the change

Fix for a core dump in blkmapd. The linked SRU bug has testing instructions.

I haven't heard back from upstream yet, maybe the final commit will be different. I'll evaluate if/when that happens, and submit to debian.

Once LL is open, I'll propose the fix there too, and then proceed with the SRU.

PPA: https://launchpad.net/~ahasenack/+archive/ubuntu/blkmapd-invalid-free

To post a comment you must log in.
Revision history for this message
Bryce Harrington (bryce) wrote :

See the jammy MP for review comments.

+1 to plan on waiting to LL opening, given that SRU processing is slow right now.

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: ahasenack, bryce
Uploaders: ahasenack, bryce
MP auto-approved

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

lunar isn't open yet, but it exists, and can be uploaded to (unapproved, though), which I did. I'll now proceed with this SRU.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Uploaded:

Uploading nfs-utils_2.6.1-2ubuntu4.1.dsc
Uploading nfs-utils_2.6.1-2ubuntu4.1.debian.tar.xz
Uploading nfs-utils_2.6.1-2ubuntu4.1_source.buildinfo
Uploading nfs-utils_2.6.1-2ubuntu4.1_source.changes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 68e44d7..60bc1df 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
1nfs-utils (1:2.6.1-2ubuntu4.1) kinetic; urgency=medium
2
3 * d/p/blkmapd-fix-invalid-free.patch: fix blkmapd crash due to invalid
4 free() (LP: #1979885)
5
6 -- Andreas Hasenack <andreas@canonical.com> Thu, 20 Oct 2022 11:45:11 -0300
7
1nfs-utils (1:2.6.1-2ubuntu4) kinetic; urgency=medium8nfs-utils (1:2.6.1-2ubuntu4) kinetic; urgency=medium
29
3 * No-change rebuild against libevent-core-2.1-7a10 * No-change rebuild against libevent-core-2.1-7a
diff --git a/debian/patches/blkmapd-fix-invalid-free.patch b/debian/patches/blkmapd-fix-invalid-free.patch
4new file mode 10064411new file mode 100644
index 0000000..bdcdc19
--- /dev/null
+++ b/debian/patches/blkmapd-fix-invalid-free.patch
@@ -0,0 +1,39 @@
1Description: remove invalid free() call
2 The data pointer is not allocated separatedly, it's the struct that needs to
3 be free()ed.
4 Originally reported by lixiaokeng via
5 https://www.spinics.net/lists/linux-nfs/msg87598.html with a slightly different
6 fix proposal.
7Author: Andreas Hasenack <andreas@canonical.com>
8Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022185
9Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1979885
10Forwarded: https://lore.kernel.org/linux-nfs/CANYNYEG=utJ2pe+FtMWh8O+dz63R2wbzOC7ZVrvoqD=U04WL5g@mail.gmail.com/T/#u
11Last-Update: 2022-10-20
12diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c
13index 2736ac89..b3786a1f 100644
14--- a/utils/blkmapd/device-discovery.c
15+++ b/utils/blkmapd/device-discovery.c
16@@ -188,7 +188,6 @@ static void bl_add_disk(char *filepath)
17
18 if (disk && diskpath) {
19 if (serial) {
20- free(serial->data);
21 free(serial);
22 }
23 return;
24@@ -229,7 +228,6 @@ static void bl_add_disk(char *filepath)
25 disk->valid_path = path;
26 }
27 if (serial) {
28- free(serial->data);
29 free(serial);
30 }
31 }
32@@ -242,7 +240,6 @@ static void bl_add_disk(char *filepath)
33 free(path);
34 }
35 if (serial) {
36- free(serial->data);
37 free(serial);
38 }
39 return;
diff --git a/debian/patches/series b/debian/patches/series
index 34ce413..ea6946e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ svcgssd-document-missing-options.patch
11nfs-conf-manpage-missing-svcgssd-options.patch11nfs-conf-manpage-missing-svcgssd-options.patch
12always-run-generator.patch12always-run-generator.patch
13fix-format-overflow-warning.patch13fix-format-overflow-warning.patch
14blkmapd-fix-invalid-free.patch

Subscribers

People subscribed via source and target branches