]> code.ossystems Code Review - openembedded-core.git/commit
systemd: Add fix for systemd-networkd crash during free
authorRanjitsinh Rathod <ranjitsinh.rathod@kpit.com>
Wed, 22 Sep 2021 15:38:08 +0000 (21:08 +0530)
committerSteve Sakoman <steve@sakoman.com>
Thu, 30 Sep 2021 14:20:38 +0000 (04:20 -1000)
commitadca61c61d84f022fdedd2d616e7c2df00661af8
tree32050968277e3d57f90882f423138621fd9809bf
parent809b3a22a56d794c3ae5f82d4a4a6a5c889ed42e
systemd: Add fix for systemd-networkd crash during free

We are observing systemd-network service crash during link down
while freeing link->ifname pointer

Backtrace:
(gdb) bt
0  __GI_abort () at abort.c:107
1  0x0000007f861d32b4 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7f8628d500 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
2  0x0000007f861da51c in malloc_printerr (str=str@entry=0x7f86289070 "free(): invalid next size (fast)") at malloc.c:5347
3  0x0000007f861dbd58 in _int_free (av=0x7f862c9a28 <main_arena>, p=0x558aa28eb0, have_lock=0) at malloc.c:4249
4  0x0000005569249cf0 in link_free (link=0x558aa1c0d0) at ../git/src/network/networkd-link.c:715
5  link_unref (p=0x558aa1c0d0) at ../git/src/network/networkd-link.c:734
6  0x000000556920f34c in manager_rtnl_process_link (rtnl=<optimized out>, message=0x558aa2a430, userdata=0x558a9fc630)

While checking upstream code change with regards to link->ifname
memory allocation and free, we found below PR which also fixes
random systemd-networkd crash:

https://github.com/systemd/systemd/pull/19631
https://github.com/systemd/systemd/issues/19629

Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
Signed-off-by: Ranjitsinh Rathod <ranjitsinhrathod1991@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-core/systemd/systemd/basic-pass-allocation-info-for-ordered-set-new-and-introd.patch [new file with mode: 0644]
meta/recipes-core/systemd/systemd/introduce-ordered_set_clear-free-with-destructor.patch [new file with mode: 0644]
meta/recipes-core/systemd/systemd/network-add-skeleton-of-request-queue.patch [new file with mode: 0644]
meta/recipes-core/systemd/systemd/network-also-drop-requests-when-link-enters-linger-state.patch [new file with mode: 0644]
meta/recipes-core/systemd/systemd/network-fix-Link-reference-counter-issue.patch [new file with mode: 0644]
meta/recipes-core/systemd/systemd/network-merge-link_drop-and-link_detach_from_manager.patch [new file with mode: 0644]
meta/recipes-core/systemd/systemd_244.5.bb