Actions
Bug #4487
closedSIGSEGV if config file lacks 'authorizations' section
Start date:
02/03/2018
Due date:
% Done:
100%
Estimated time:
Description
CommandAuthenticator
blindly dereferences a null pointer (default-constructed shared_ptr
).
#0 ndn::security::v2::Validator::validate(ndn::Interest const&, std::function<void (ndn::Interest const&)> const&, std::function<void (ndn::Interest const&, ndn::security::v2::ValidationError const&)> const&) (this=this@entry=0x0, interest=..., successCb=..., failureCb=...) at ../src/security/v2/validator.cpp:102
#1 0x0000555555667809 in nfd::CommandAuthenticator::<lambda(const ndn::Name&, const ndn::Interest&, const ndn::mgmt::ControlParameters*, const AcceptContinuation&, const RejectContinuation&)>::operator() (reject=..., accept=..., params=<optimized out>, interest=..., prefix=..., __closure=<optimized out>)
at ../daemon/mgmt/command-authenticator.cpp:218
#2 std::_Function_handler<void(const ndn::Name&, const ndn::Interest&, const ndn::mgmt::ControlParameters*, const std::function<void(const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)>&, const std::function<void(ndn::mgmt::RejectReply)>&), nfd::CommandAuthenticator::makeAuthorization(const string&, const string&)::<lambda(const ndn::Name&, const ndn::Interest&, const ndn::mgmt::ControlParameters*, const AcceptContinuation&, const RejectContinuation&)> >::_M_invoke(const std::_Any_data &, const ndn::Name &, const ndn::Interest &, const ndn::mgmt::ControlParameters *&&, const std::function<void(const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)> &, const std::function<void(ndn::mgmt::RejectReply)> &) (
__functor=..., __args#0=..., __args#1=..., __args#2=<optimized out>, __args#3=..., __args#4=...) at /usr/include/c++/7/bits/std_function.h:316
#3 0x00007ffff7b3b970 in std::function<void (ndn::Name const&, ndn::Interest const&, ndn::mgmt::ControlParameters const*, std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&, std::function<void (ndn::mgmt::RejectReply)> const&)>::operator()(ndn::Name const&, ndn::Interest const&, ndn::mgmt::ControlParameters const*, std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&, std::function<void (ndn::mgmt::RejectReply)> const&) const (__args#4=..., __args#3=..., __args#2=<optimized out>, __args#1=...,
__args#0=..., this=0x5555558d2c30) at /usr/include/c++/7/bits/std_function.h:706
#4 ndn::mgmt::Dispatcher::processControlCommandInterest(ndn::Name const&, ndn::Name const&, ndn::Interest const&, std::function<std::shared_ptr<ndn::mgmt::ControlParameters> (ndn::name::Component const&)> const&, std::function<void (ndn::Name const&, ndn::Interest const&, ndn::mgmt::ControlParameters const*, std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&, std::function<void (ndn::mgmt::RejectReply)> const&)> const&, std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ndn::Name const&, ndn::Interest const&, std::shared_ptr<ndn::mgmt::ControlParameters> const&)> const&, std::function<void (ndn::mgmt::RejectReply, ndn::Interest const&)> const&) (
this=<optimized out>, prefix=..., relPrefix=..., interest=..., parser=..., authorization=..., accepted=..., rejected=...)
at ../src/mgmt/dispatcher.cpp:223
[several more irrelevant frames omitted for brevity]
Updated by Davide Pesavento almost 7 years ago
- Status changed from New to Code review
- % Done changed from 0 to 100
Updated by Davide Pesavento almost 7 years ago
- Status changed from Code review to Closed
Actions