1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-07 17:17:44 +03:00
Backports of patch from systemd git to stable distributions
Go to file
Frantisek Sumsal aa0fb9c394 sd-network: avoid leaking DHCPLease
If we fail any allocation prior adding the lease to the server lease
hashmap.

==2103==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 128 byte(s) in 2 object(s) allocated from:
    #0 0x4a203e in __interceptor_calloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:77:3
    #1 0x4f6341 in calloc (/build/fuzz-dhcp-server+0x4f6341)
    #2 0x4ec818 in add_lease /work/build/../../src/systemd/src/libsystemd-network/fuzz-dhcp-server.c:26:9
    #3 0x4ec2bf in LLVMFuzzerTestOneInput /work/build/../../src/systemd/src/libsystemd-network/fuzz-dhcp-server.c:75:9
    #4 0x4f68a8 in NaloFuzzerTestOneInput (/build/fuzz-dhcp-server+0x4f68a8)
    #5 0x5158b3 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
    #6 0x51509a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
    #7 0x516769 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19
    #8 0x517435 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5
    #9 0x50679f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
    #10 0x507068 in LLVMFuzzerRunDriver /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:925:10
    #11 0x4f6b25 in main (/build/fuzz-dhcp-server+0x4f6b25)
    #12 0x7f16084e3082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)

DEDUP_TOKEN: __interceptor_calloc--calloc--add_lease
SUMMARY: AddressSanitizer: 128 byte(s) leaked in 2 allocation(s).

Found by Nallocufzz.

(cherry picked from commit aca607d18d)
(cherry picked from commit 18e08a46f7)
2023-07-08 10:42:52 +01:00
.clusterfuzzlite ci: unpin CFLite 2022-04-26 09:13:57 +00:00
.github mkosi: disable fedora builds 2023-04-28 16:29:56 +01:00
.semaphore semaphore: remove the Semaphore repositories recursively 2022-11-07 19:01:47 +00:00
catalog meson: Install all catalogs 2023-02-10 20:28:11 +00:00
coccinelle basic/list: drop LIST_IS_EMPTY 2022-07-02 12:46:16 +02:00
docs docs: s/authorized_key/authorized_keys/ 2023-03-30 19:21:34 +02:00
factory meson: also allow setting GIT_VERSION via templates 2022-04-05 22:18:31 +02:00
hwdb.d hwdb: update to 2533fdd0fb 2023-06-02 13:42:21 +01:00
LICENSES network: change license of examples to MIT-0 2022-10-26 08:39:34 +02:00
man man: add trailing = 2023-07-08 10:42:52 +01:00
mkosi.default.d mkosi: pull in libbpf1 instead of legacy libbpf0 on debian 2022-12-14 23:22:28 +00:00
modprobe.d meson: install the right README file in modprobe.d 2021-07-07 14:52:05 +02:00
network meson: Install missing network file 2023-02-10 20:28:11 +00:00
po po: Translated using Weblate (Chinese (Simplified) (zh_CN)) 2022-10-31 12:54:01 +01:00
presets units: enable systemd-network-generator by default 2021-12-16 09:49:39 +01:00
rules.d udev-rules: fix nvme symlink creation on namespace changes 2023-03-30 19:08:20 +02:00
shell-completion shell completion: add timesync-status and show-timesync to zsh completion file (#27574) 2023-06-02 13:42:21 +01:00
src sd-network: avoid leaking DHCPLease 2023-07-08 10:42:52 +01:00
sysctl.d tree-wide: link to docs.kernel.org for kernel documentation 2022-07-04 19:56:53 +02:00
sysusers.d sysusers: also add root group 2023-02-16 18:10:56 +00:00
test test: split the ASan wrapper into smaller blocks and tidy it up a bit 2023-07-08 10:42:52 +01:00
tmpfiles.d tmpfiles.d: drop misleading comment 2023-03-03 12:00:07 +01:00
tools Report version string as in the Boot Loader Spec, fix boot loader upgrades 2022-10-25 13:23:57 +02:00
units units: Shut down networkd and resolved on switch-root 2023-06-02 13:42:21 +01:00
xorg xorg/50-systemd-user: add a full license header 2021-10-01 14:45:00 +02:00
.clang-format clang-format: Adjust style of pointers 2022-05-30 04:00:54 +09:00
.ctags editors: Prevent ctags from following symlinks 2019-02-15 11:01:20 -08:00
.dir-locals.el scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.editorconfig docs: configure editorconfig for css and html 2022-05-17 21:13:17 +02:00
.gitattributes gitattributes: introduce and use "generated" attribute 2021-10-18 09:42:55 +02:00
.gitignore core/cgroup: CPUWeight/CPUShares support idle input 2022-08-11 14:25:58 +02:00
.mailmap mailmap: two more names 2021-03-30 13:17:58 +02:00
.packit.yml packit: remove -Ddefault-user-timeout-sec/-Ddefault-timeout-sec 2023-02-10 20:28:11 +00:00
.vimrc scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
configure tools: shellcheck-ify tool scripts 2021-09-30 12:27:06 +02:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile tree-wide: add spdx header on all scripts and helpers 2021-01-28 09:55:35 +01:00
meson_options.txt meson: fix description for link-udev-shared option 2023-06-02 13:42:21 +01:00
meson.build dirent: conditionalize dirent assert based on dirent64 existence 2023-06-02 13:42:21 +01:00
mkosi.build mkosi: Make sure bpf-framework works on CentOS Stream 8 as well 2022-10-17 08:45:48 +02:00
mkosi.postinst mkosi: Ensure we build all features/components in mkosi 2022-08-23 15:19:26 +02:00
NEWS doc: replace wrong á preposition by à 2023-03-30 18:59:30 +02:00
README docs: update unit name for sd-tmpfiles-setup 2023-03-30 18:44:58 +02:00
README.md README.md: add a missing line break 2022-10-19 11:17:33 +02:00
TODO doc: replace wrong á preposition by à 2023-03-30 18:59:30 +02:00

Systemd

System and Service Manager

Semaphore CI 2.0 Build Status
Coverity Scan Status
OSS-Fuzz Status
CIFuzz
CII Best Practices
CentOS CI - CentOS 8
CentOS CI - Arch
CentOS CI - Arch (sanitizers)
CentOS CI - Rawhide (SELinux)
Fossies codespell report
Coverage Status
Packaging status
OpenSSF Scorecard

Details

Most documentation is available on systemd's web site.

Assorted, older, general information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Code Map for information about this repository's layout and content.

Please see the Hacking guide for information on how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.