Branch: refs/heads/main
  Home:   https://github.com/seccomp/libseccomp
  Commit: 064e793e62f4d4900516ae159876b05f091a2b15
      
https://github.com/seccomp/libseccomp/commit/064e793e62f4d4900516ae159876b05f091a2b15
  Author: Giuseppe Scrivano <[email protected]>
  Date:   2021-03-18 (Thu, 18 Mar 2021)

  Changed paths:
    M src/gen_bpf.c
    M src/helper.c
    M src/helper.h

  Log Message:
  -----------
  bpf: fix uninitialized value usage

it was reported by clang with the option -fsanitize=memory:

Uninitialized bytes in MemcmpInterceptorCommon at offset 0 inside 
[0x7070000002a0, 56)
==3791089==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x482a2c in memcmp (fuzzer+0x482a2c)
    #1 0x7fed2f120ebb in _hsh_add src/libseccomp/src/gen_bpf.c:598:9
    #2 0x7fed2f121715 in _gen_bpf_action_hsh src/libseccomp/src/gen_bpf.c:796:6
    #3 0x7fed2f121a53 in _gen_bpf_node src/libseccomp/src/gen_bpf.c:831:11
    #4 0x7fed2f121a53 in _gen_bpf_chain.isra.0 
src/libseccomp/src/gen_bpf.c:1072:13
    #5 0x7fed2f121f16 in _gen_bpf_chain_lvl_res 
src/libseccomp/src/gen_bpf.c:977:12
    #6 0x7fed2f121c74 in _gen_bpf_chain.isra.0 
src/libseccomp/src/gen_bpf.c:1124:12
    #7 0x7fed2f12253c in _gen_bpf_syscall src/libseccomp/src/gen_bpf.c:1520:10
    #8 0x7fed2f12253c in _gen_bpf_syscalls src/libseccomp/src/gen_bpf.c:1615:18
    #9 0x7fed2f12253c in _gen_bpf_arch src/libseccomp/src/gen_bpf.c:1683:7
    #10 0x7fed2f12253c in _gen_bpf_build_bpf 
src/libseccomp/src/gen_bpf.c:2056:11
    #11 0x7fed2f12253c in gen_bpf_generate src/libseccomp/src/gen_bpf.c:2321:7
    #12 0x7fed2f11f41c in seccomp_export_bpf src/libseccomp/src/api.c:724:7

  Uninitialized value was created by a heap allocation
    #0 0x4547ef in realloc (fuzzer+0x4547ef)
    #1 0x7fed2f121244 in _blk_resize src/libseccomp/src/gen_bpf.c:362:8
    #2 0x7fed2f121244 in _blk_append src/libseccomp/src/gen_bpf.c:394:6

Signed-off-by: Giuseppe Scrivano <[email protected]>


  Commit: 591089f58795edcee62be407244175633ab029cf
      
https://github.com/seccomp/libseccomp/commit/591089f58795edcee62be407244175633ab029cf
  Author: Giuseppe Scrivano <[email protected]>
  Date:   2021-03-18 (Thu, 18 Mar 2021)

  Changed paths:
    M src/helper.c

  Log Message:
  -----------
  helper: let zmalloc use cmalloc

The calloc function from the stdlib already sets the memory to 0.

Signed-off-by: Giuseppe Scrivano <[email protected]>


  Commit: 83da908ba323a3e8635b1ec5fa0da78f8794c1c8
      
https://github.com/seccomp/libseccomp/commit/83da908ba323a3e8635b1ec5fa0da78f8794c1c8
  Author: Tom Hromatka <[email protected]>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

  Changed paths:
    M src/gen_bpf.c
    M src/helper.c
    M src/helper.h

  Log Message:
  -----------
  Merge pull request #319 from giuseppe/fix-unitialized-value-usage

BUG: fix uninitialized value usage in gen_bpf.c


Compare: 
https://github.com/seccomp/libseccomp/compare/c305ef351bc9...83da908ba323

-- 
You received this message because you are subscribed to the Google Groups 
"libseccomp" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/libseccomp/seccomp/libseccomp/push/refs/heads/main/c305ef-83da90%40github.com.

Reply via email to