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

Implement USB device descriptor decoder #10

Closed
dkopecek opened this issue Mar 27, 2015 · 1 comment
Closed

Implement USB device descriptor decoder #10

dkopecek opened this issue Mar 27, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@dkopecek
Copy link
Member

A USB device descriptor decoder is needed for getting information about the interfaces that a USB device provides.

We could link to libusb, but there's AFAIK no possibility to instantiate a usb device structure directly without calling the "get list" function which enumerates all devices. However, it might be possible to extract just the decoder from the code and simplify it to the bare minimum.

Another possibility is to implement the decoder from scratch...

@dkopecek dkopecek added the RFE label Mar 27, 2015
@dkopecek dkopecek self-assigned this Mar 27, 2015
@dkopecek dkopecek added this to the v0.2 milestone Mar 27, 2015
@dkopecek
Copy link
Member Author

dkopecek commented Apr 1, 2015

Resolved in 9e40061 by implementing a set of simple USB descriptor parsing functions.

@dkopecek dkopecek closed this as completed Apr 1, 2015
dkopecek pushed a commit that referenced this issue May 26, 2016
Resolves: #69

Addresses:
```
Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7f8076950bb0 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc2bb0)
    #1 0x7f8075969fe5 in usbguard::parseRuleSpecification(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, unsigned int) src/Library/RuleParser.cpp:72
    #2 0x7f807599382f in usbguard::RulePrivate::fromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) src/Library/RulePrivate.cpp:599
    #3 0x7f8075958d38 in usbguard::Rule::fromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) src/Library/Rule.cpp:254
    #4 0x512764 in ____C_A_T_C_H____T_E_S_T____6 Regression/test_Rule_ghi37.cpp:15
    #5 0x461b26 in Catch::FreeFunctionTestCase::invoke() const (/home/james/deb-pkg/TEMP-PACKAGES/usbguard/upstream/src/Tests/.libs/lt-test-regression+0x461b26)
    #6 0x416165 in Catch::TestCase::invoke() const ../../src/ThirdParty/Catch/include/internal/catch_test_case_info.hpp:176
    #7 0x45cffb in Catch::RunContext::invokeActiveTestCase() (/home/james/deb-pkg/TEMP-PACKAGES/usbguard/upstream/src/Tests/.libs/lt-test-regression+0x45cffb)
    #8 0x45bcfe in Catch::RunContext::runCurrentTest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (/home/james/deb-pkg/TEMP-PACKAGES/usbguard/upstream/src/Tests/.libs/lt-test-regression+0x45bcfe)
    #9 0x454516 in Catch::RunContext::runTest(Catch::TestCase const&) (/home/james/deb-pkg/TEMP-PACKAGES/usbguard/upstream/src/Tests/.libs/lt-test-regression+0x454516)
    #10 0x40d04f in Catch::runTests(Catch::Ptr<Catch::Config> const&) ../../src/ThirdParty/Catch/include/internal/../catch_session.hpp:78
    #11 0x45f67f in Catch::Session::run() (/home/james/deb-pkg/TEMP-PACKAGES/usbguard/upstream/src/Tests/.libs/lt-test-regression+0x45f67f)
    #12 0x45ef2f in Catch::Session::run(int, char const* const*) (/home/james/deb-pkg/TEMP-PACKAGES/usbguard/upstream/src/Tests/.libs/lt-test-regression+0x45ef2f)
    #13 0x42ad3a in main ../../src/ThirdParty/Catch/include/internal/catch_default_main.hpp:15
    #14 0x7f80736df77f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2077f)
```
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

1 participant