Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: problems using the Python bindings #3

Closed
amitsaha opened this issue Mar 13, 2015 · 3 comments
Closed

BUG: problems using the Python bindings #3

amitsaha opened this issue Mar 13, 2015 · 3 comments
Assignees
Labels

Comments

@amitsaha
Copy link

This is what I have so far:

$ sudo make install
  PYTHON   build
make[1]: Entering directory '/home/gene/libseccomp/src/python'
VERSION_RELEASE="0.0.0" CPPFLAGS="-I\../../include -I../../include " CFLAGS="-Wall -g -O2" LDFLAGS="-Wl,-z -Wl,relro " /usr/bin/env python ./setup.py install --prefix=//usr/local
running install
running build
running build_ext
skipping 'seccomp.c' Cython extension (up-to-date)
running install_lib
running install_egg_info
Removing //usr/local/lib64/python2.7/site-packages/seccomp-0.0.0-py2.7.egg-info
Writing //usr/local/lib64/python2.7/site-packages/seccomp-0.0.0-py2.7.egg-info
make[1]: Nothing to be done for 'install-data-am'.
make[1]: Leaving directory '/home/gene/libseccomp/src/python'

I can't seem to import it though:

$ python
Python 2.7.9 (default, Feb  6 2015, 14:42:41) 
[GCC 5.0.0 20150205 (Red Hat 5.0.0-0.7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from seccomp import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named seccomp
>>> 

Probably I am missing something.

@pcmoore
Copy link
Member

pcmoore commented Mar 13, 2015

Is your python install setup to look for python modules under /usr/local?

@pcmoore pcmoore self-assigned this Mar 13, 2015
@pcmoore pcmoore changed the title How to use the Python bindings? Problems using the Python bindings Mar 13, 2015
@pcmoore pcmoore changed the title Problems using the Python bindings BUG: problems using the Python bindings Mar 13, 2015
@amitsaha
Copy link
Author

Good point, i will check it and report back.

@amitsaha
Copy link
Author

Yup, that was it. Sorry for the noise.

giuseppe added a commit to giuseppe/libseccomp that referenced this issue Mar 18, 2021
it was reported by clang with the option -fsanitize=memory:

  Uninitialized value was created by a heap allocation
    #0 0x4547ef in realloc (src/crun/tests/tests_libcrun_fuzzer+0x4547ef)
    seccomp#1 0x7f4900a3a903 in _bpf_append_blk src/libseccomp/src/gen_bpf.c:452:10
    seccomp#2 0x7f4900a3a903 in _gen_bpf_build_bpf src/libseccomp/src/gen_bpf.c:2276:8
    seccomp#3 0x7f4900a3a903 in gen_bpf_generate src/libseccomp/src/gen_bpf.c:2324:7

  Uninitialized value was created by a heap allocation
    #0 0x4547ef in realloc (src/crun/tests/tests_libcrun_fuzzer+0x4547ef)
    seccomp#1 0x7f8f755a81c0 in _blk_resize.constprop.0 src/libseccomp/src/gen_bpf.c:362:8

Signed-off-by: Giuseppe Scrivano <[email protected]>
giuseppe added a commit to giuseppe/libseccomp that referenced this issue Mar 18, 2021
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)
    seccomp#1 0x7fed2f120ebb in _hsh_add src/libseccomp/src/gen_bpf.c:598:9
    seccomp#2 0x7fed2f121715 in _gen_bpf_action_hsh src/libseccomp/src/gen_bpf.c:796:6
    seccomp#3 0x7fed2f121a53 in _gen_bpf_node src/libseccomp/src/gen_bpf.c:831:11
    seccomp#4 0x7fed2f121a53 in _gen_bpf_chain.isra.0 src/libseccomp/src/gen_bpf.c:1072:13
    seccomp#5 0x7fed2f121f16 in _gen_bpf_chain_lvl_res src/libseccomp/src/gen_bpf.c:977:12
    seccomp#6 0x7fed2f121c74 in _gen_bpf_chain.isra.0 src/libseccomp/src/gen_bpf.c:1124:12
    seccomp#7 0x7fed2f12253c in _gen_bpf_syscall src/libseccomp/src/gen_bpf.c:1520:10
    seccomp#8 0x7fed2f12253c in _gen_bpf_syscalls src/libseccomp/src/gen_bpf.c:1615:18
    seccomp#9 0x7fed2f12253c in _gen_bpf_arch src/libseccomp/src/gen_bpf.c:1683:7
    seccomp#10 0x7fed2f12253c in _gen_bpf_build_bpf src/libseccomp/src/gen_bpf.c:2056:11
    seccomp#11 0x7fed2f12253c in gen_bpf_generate src/libseccomp/src/gen_bpf.c:2321:7
    seccomp#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)
    seccomp#1 0x7fed2f121244 in _blk_resize src/libseccomp/src/gen_bpf.c:362:8
    seccomp#2 0x7fed2f121244 in _blk_append src/libseccomp/src/gen_bpf.c:394:6

Signed-off-by: Giuseppe Scrivano <[email protected]>
giuseppe added a commit to giuseppe/libseccomp that referenced this issue Mar 18, 2021
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)
    seccomp#1 0x7fed2f120ebb in _hsh_add src/libseccomp/src/gen_bpf.c:598:9
    seccomp#2 0x7fed2f121715 in _gen_bpf_action_hsh src/libseccomp/src/gen_bpf.c:796:6
    seccomp#3 0x7fed2f121a53 in _gen_bpf_node src/libseccomp/src/gen_bpf.c:831:11
    seccomp#4 0x7fed2f121a53 in _gen_bpf_chain.isra.0 src/libseccomp/src/gen_bpf.c:1072:13
    seccomp#5 0x7fed2f121f16 in _gen_bpf_chain_lvl_res src/libseccomp/src/gen_bpf.c:977:12
    seccomp#6 0x7fed2f121c74 in _gen_bpf_chain.isra.0 src/libseccomp/src/gen_bpf.c:1124:12
    seccomp#7 0x7fed2f12253c in _gen_bpf_syscall src/libseccomp/src/gen_bpf.c:1520:10
    seccomp#8 0x7fed2f12253c in _gen_bpf_syscalls src/libseccomp/src/gen_bpf.c:1615:18
    seccomp#9 0x7fed2f12253c in _gen_bpf_arch src/libseccomp/src/gen_bpf.c:1683:7
    seccomp#10 0x7fed2f12253c in _gen_bpf_build_bpf src/libseccomp/src/gen_bpf.c:2056:11
    seccomp#11 0x7fed2f12253c in gen_bpf_generate src/libseccomp/src/gen_bpf.c:2321:7
    seccomp#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)
    seccomp#1 0x7fed2f121244 in _blk_resize src/libseccomp/src/gen_bpf.c:362:8
    seccomp#2 0x7fed2f121244 in _blk_append src/libseccomp/src/gen_bpf.c:394:6

Signed-off-by: Giuseppe Scrivano <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants