[lxc-devel] [lxc/lxc] cc5212: oss-fuzz: fuzz lxc_config_define_add and lxc_confi...

Christian Brauner noreply at github.com
Wed Apr 7 12:18:57 UTC 2021


  Branch: refs/heads/stable-4.0
  Home:   https://github.com/lxc/lxc
  Commit: cc521256fa03ad49cecf160edd2ae61bfc6cbe05
      https://github.com/lxc/lxc/commit/cc521256fa03ad49cecf160edd2ae61bfc6cbe05
  Author: Evgeny Vereshchagin <evvers at ya.ru>
  Date:   2021-04-07 (Wed, 07 Apr 2021)

  Changed paths:
    M src/lxc/confile.c
    A src/tests/fuzz-lxc-define-load.c
    M src/tests/oss-fuzz.sh

  Log Message:
  -----------
  oss-fuzz: fuzz lxc_config_define_add and lxc_config_define_load

Signed-off-by: Evgeny Vereshchagin <evvers at ya.ru>


  Commit: dc95a270de4cb984dfa4ca81573ab22ff6ed29d1
      https://github.com/lxc/lxc/commit/dc95a270de4cb984dfa4ca81573ab22ff6ed29d1
  Author: Evgeny Vereshchagin <evvers at ya.ru>
  Date:   2021-04-07 (Wed, 07 Apr 2021)

  Changed paths:
    M src/lxc/confile.c

  Log Message:
  -----------
  confile: fix a memory leak lxc_config_define_add

```
2021-04-02T05:45:54.9410345Z ==13==ERROR: LeakSanitizer: detected memory leaks
2021-04-02T05:45:54.9410737Z
2021-04-02T05:45:54.9411488Z Direct leak of 16 byte(s) in 1 object(s) allocated from:
2021-04-02T05:45:54.9412556Z     #0 0x54d752 in calloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:154:3
2021-04-02T05:45:54.9413360Z     #1 0x583795 in parse_new_conf_line /src/lxc/src/lxc/confile.c:3048:8
2021-04-02T05:45:54.9414057Z     #2 0x582f1a in lxc_config_define_add /src/lxc/src/lxc/confile.c:3090:15
2021-04-02T05:45:54.9415352Z     #3 0x5810fa in LLVMFuzzerTestOneInput /src/lxc/src/tests/fuzz-lxc-define-load.c:30:6
2021-04-02T05:45:54.9419212Z     #4 0x483b93 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
2021-04-02T05:45:54.9421819Z     #5 0x48309a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:505:3
2021-04-02T05:45:54.9424205Z     #6 0x485474 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:814:7
2021-04-02T05:45:54.9426658Z     #7 0x485689 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:845:3
2021-04-02T05:45:54.9428616Z     #8 0x473717 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:906:6
2021-04-02T05:45:54.9429989Z     #9 0x49f572 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
2021-04-02T05:45:54.9433312Z     #10 0x7fa96041b83f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)
2021-04-02T05:45:54.9433795Z
2021-04-02T05:45:54.9434661Z DEDUP_TOKEN: calloc--parse_new_conf_line--lxc_config_define_add
2021-04-02T05:45:54.9435483Z SUMMARY: AddressSanitizer: 16 byte(s) leaked in 1 allocation(s).
2021-04-02T05:45:54.9435958Z
2021-04-02T05:45:54.9436404Z INFO: a leak has been found in the initial corpus.
```

Signed-off-by: Evgeny Vereshchagin <evvers at ya.ru>


  Commit: 2be8511d3b020febed50266e1d76a769b8f8c888
      https://github.com/lxc/lxc/commit/2be8511d3b020febed50266e1d76a769b8f8c888
  Author: Evgeny Vereshchagin <evvers at ya.ru>
  Date:   2021-04-07 (Wed, 07 Apr 2021)

  Changed paths:
    M .github/workflows/cifuzz.yml

  Log Message:
  -----------
  cifuzz: fuzz longer

Signed-off-by: Evgeny Vereshchagin <evvers at ya.ru>


  Commit: b425aad13f4a2a5e10a50e37dad83b771312a108
      https://github.com/lxc/lxc/commit/b425aad13f4a2a5e10a50e37dad83b771312a108
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-04-07 (Wed, 07 Apr 2021)

  Changed paths:
    M src/lxc/macro.h

  Log Message:
  -----------
  macro: ensure ret_errno() always returns negative

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: b33f435db702da255cf4990174629e032ebd84e1
      https://github.com/lxc/lxc/commit/b33f435db702da255cf4990174629e032ebd84e1
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-04-07 (Wed, 07 Apr 2021)

  Changed paths:
    M src/lxc/log.h

  Log Message:
  -----------
  log: add error_ret()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: fe38f0b149338f89bcf9a540e695e664bdd2d55b
      https://github.com/lxc/lxc/commit/fe38f0b149338f89bcf9a540e695e664bdd2d55b
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-04-07 (Wed, 07 Apr 2021)

  Changed paths:
    M src/lxc/confile.c

  Log Message:
  -----------
  confile: enforce maximum subkey length

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


Compare: https://github.com/lxc/lxc/compare/5a624e087078...fe38f0b14933


More information about the lxc-devel mailing list