~/talk

Integrating Some Rust in VLC Media Player

Talkat RustConf 2016 · 2016-09-09..09-10· [rust, security]
slides:none on file

Claim: replace security‑critical VLC C parsers with Rust code. Implementation uses Rust plus nom parser combinators, hand‑written C bindings and isolated unsafe wrappers. Built an FLV parser module compiled as a dynamic library, loaded into VLC and successfully plays sample video. Surprises: parser itself takes hours to write but integration and build‑system glue (autotools, object shim hacks) takes days. Tooling notes: cargo, cargo vendor, and careful wrapper design make incremental replacement feasible though nontrivial.

AI-written summary · about

  1. 0:00Intro
  2. 1:35VLC media player vulnerabilities
  3. 1:52Format vulnerabilities
  4. 3:06We need a practical solution
  5. 3:44Yay! Rust!
  6. 5:40what is nom?
  7. 6:23Basic types
  8. 7:02MACROS!!!
  9. 8:20Actual generated code
  10. 10:26How VLC works
  11. 11:40Code architecture
  12. 12:45Lifetime of a VLC module
  13. 14:01The plan
  14. 14:35Reproducing structures
  15. 15:19C structure to Rust
  16. 15:56Importing functions
  17. 16:33Writing safer wrappers
  18. 16:57preparing a VLC module in C
  19. 18:00Writing the module registration
  20. 19:27Write a FLV parser
  21. 20:05Parse the header
  22. 22:12FLV packets
  23. 23:04Check the header (audio case)
  24. 26:14Now, the build system
  25. 27:13First, check for cargo and Rust
  26. 27:31Declaring and building a Rust module
  27. 28:49Summing up
  28. 31:21Greetings
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.