1. 21 Dec, 2017 1 commit
  2. 20 Dec, 2017 1 commit
  3. 08 Nov, 2017 6 commits
  4. 07 Nov, 2017 3 commits
  5. 01 Nov, 2017 1 commit
  6. 30 Oct, 2017 1 commit
    • Vivek Das Mohapatra's avatar
      capsule: rework the handle infrastructure to allow multiple capsules · 9a983db3
      Vivek Das Mohapatra authored
      Define a capsule mete-data struct which can be declared globally
      per-proxy to allow libcapsule to manage a set of capsules and
      merge them into one namespace if they share a /host prefix.
      
      This allows us to have one capsule per proxied library, each
      with the correct soname instead of one monolithic blob capsule
      which can only have one soname.
      
      Conflicts:
      	capsule/capsule-dlmopen.c
      	capsule/capsule-init.c
      	capsule/capsule-wrappers.c
      9a983db3
  7. 12 Oct, 2017 1 commit
  8. 11 Oct, 2017 1 commit
  9. 10 Oct, 2017 4 commits
  10. 09 Oct, 2017 2 commits
  11. 02 Oct, 2017 1 commit
  12. 30 Sep, 2017 3 commits
  13. 20 Sep, 2017 1 commit
  14. 15 Sep, 2017 3 commits
  15. 14 Sep, 2017 3 commits
  16. 13 Sep, 2017 1 commit
    • Vivek Das Mohapatra's avatar
      Implement a capsule_shim_dlsym helper · 5107c747
      Vivek Das Mohapatra authored
      In addition to wrapping dlopen() inside the capsule we need to
      wrap dlsym() outside the capsule in order to allow libraries
      that use a dlopen()/dlsym() pattern to work transparently.
      
      capsule_shim_dlsym() bundles most of the standard logic we
      expect such wrappers to use.
      5107c747
  17. 11 Sep, 2017 1 commit
  18. 04 Jul, 2017 2 commits
  19. 28 Jun, 2017 1 commit
  20. 24 May, 2017 3 commits
    • Vivek Das Mohapatra's avatar
      capsule-dlmopen.c: don't fake dynamic section size from wrap() · 25a00ab9
      Vivek Das Mohapatra authored
      When munging the ELF data structures from the capsule-export code path
      via dl_iterate_phdr, we get the dynamic section size as a callback arg
      so we can double-check we haven't ended up outside the memory region
      we expect to be working on.
      
      Unfortunately when using link_map traversal to do the same sort of thing
      to install wrapper functions inside the capsule we don't have this
      information. We were using SIZE_MAX on ELFCLASS64 to pass a "big enough"
      size parameter but this calculation does not work on ELFCLASS32.
      
      Rather than go out of our way to produce a bogus-but-big-enough value
      we now pass 0 for the size and have the called functions know that they
      can't do the double-check if passed a size of 0.
      
      The last entry in the dyn section should have a D_TAG of DT_NULL
      anyway so we'll only crash off the end of the dynamic section if
      the linker is broken or malicious (which is probably not worth
      defending against, all things considered).
      25a00ab9
    • Vivek Das Mohapatra's avatar
      capsule-dlmopen.c: when debugging WRAPPERS turn on extra debug for ELF · 687f1075
      Vivek Das Mohapatra authored
      The code path that installs wrappers inside the capsule is the same
      as the one that scribbles capsule functions out into the rest of the
      application - however if we don't want to turn on noisy debug in the
      ELF handling paths all the time - so we cheat and turn it on around
      the ELF munging call from the wrap function only if DEBUG_WRAPPERS
      is already in the flags.
      687f1075
    • Vivek Das Mohapatra's avatar