sctp_userspace_get_mtu_from_ifn should not try to get MTU from socket
Categories
(Core :: WebRTC: Networking, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: gerard-majax, Assigned: gerard-majax)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
Details |
From bug 1434134:
(gdb) bt
#0 mozilla::SandboxPolicyCommon::SocketpairDatagramTrap(sandbox::arch_seccomp_data const&, void*) (aArgs=..., aux=0x0) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/security/sandbox/linux/SandboxFilter.cpp:449
#1 0x00007f8a0b2ee04b in sandbox::Trap::SigSys(int, siginfo_t*, ucontext_t*) (this=<optimized out>, nr=<optimized out>, info=<optimized out>, ctx=<optimized out>) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc:251
#2 0x00007f8a0b322db4 in mozilla::SigSysHandler(int, siginfo_t*, void*) (nr=31, info=0x7f89fc26c4f0, void_context=0x7f89fc26c3c0) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/security/sandbox/linux/Sandbox.cpp:135
#3 0x00007f8a0b28b140 in <signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0
#4 0x00007f8a0ae7e4aa in socketpair () at ../sysdeps/unix/syscall-template.S:120
#5 0x00007f8a0b32b8c8 in mozilla::ContentSandboxPolicy::FakeSocketTrapCommon(int, int, int) (domain=<optimized out>, type=524290, protocol=0) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/security/sandbox/linux/SandboxFilter.cpp:1007
#6 mozilla::ContentSandboxPolicy::FakeSocketTrap(sandbox::arch_seccomp_data const&, void*) (aArgs=<optimized out>, aux=<optimized out>) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/security/sandbox/linux/SandboxFilter.cpp:1015
#7 0x00007f8a0b2ee04b in sandbox::Trap::SigSys(int, siginfo_t*, ucontext_t*) (this=<optimized out>, nr=<optimized out>, info=<optimized out>, ctx=<optimized out>) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc:251
#8 0x00007f8a0b322db4 in mozilla::SigSysHandler(int, siginfo_t*, void*) (nr=31, info=0x7f89fc26d1f0, void_context=0x7f89fc26d0c0) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/security/sandbox/linux/Sandbox.cpp:135
#9 0x00007f8a0b28b140 in <signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007f8a0ae7e477 in socket () at ../sysdeps/unix/syscall-template.S:120
#11 0x00007f8a0ae7e593 in __opensock () at ../sysdeps/unix/sysv/linux/opensock.c:65
#12 0x00007f8a0ae96744 in __if_indextoname (ifindex=ifindex@entry=4294967295, ifname=ifname@entry=0x7f89fc26d720 "") at ../sysdeps/unix/sysv/linux/if_index.c:226
#13 0x00007f8a01524a89 in sctp_userspace_get_mtu_from_ifn (if_index=1, if_index@entry=4294967295, af=123) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/netwerk/sctp/src/netinet/sctp_userspace.c:105
#14 0x00007f8a01516f9e in sctp_add_addr_to_vrf (vrf_id=vrf_id@entry=0, ifn=ifn@entry=0x0, ifn_index=ifn_index@entry=4294967295, ifn_type=<optimized out>, ifn_type@entry=0, if_name=0x7f89fe42a454 "conn", ifa=ifa@entry=0x0, addr=0x7f89fc26d808, ifa_flags=0, dynamic_add=0)
at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/netwerk/sctp/src/netinet/sctp_pcb.c:594
#15 0x00007f8a0153d29f in usrsctp_register_address (addr=<optimized out>) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/netwerk/sctp/src/user_socket.c:3153
#16 0x00007f8a0154a5d5 in mozilla::DataChannelConnection::Init(unsigned short, unsigned short, mozilla::Maybe<unsigned long> const&)::$_1::operator()() const (this=0x7f89fa923420) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/netwerk/sctp/datachannel/DataChannel.cpp:608
#17 mozilla::detail::RunnableFunction<mozilla::DataChannelConnection::Init(unsigned short, unsigned short, mozilla::Maybe<unsigned long> const&)::$_1>::Run() (this=0x7f89fa923400) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/obj-browser/dist/include/nsThreadUtils.h:534
#18 0x00007f8a00f3429e in nsThread::ProcessNextEvent(bool, bool*) (this=0x7f8a0ab9abb0, aMayWait=<optimized out>, aResult=<optimized out>) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/xpcom/threads/nsThread.cpp:1153
#19 0x00007f8a00f37e38 in NS_ProcessNextEvent(nsIThread*, bool) (aThread=0x1, aMayWait=true) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/xpcom/threads/nsThreadUtils.cpp:548
#20 0x00007f8a01052bbf in mozilla::net::nsSocketTransportService::Run() (this=0x7f89fcb1f580) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/netwerk/base/nsSocketTransportService2.cpp:1200
#21 0x00007f8a010537fd in non-virtual thunk to mozilla::net::nsSocketTransportService::Run() () at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/netwerk/base/nsSocketTransportService2.cpp:1279
#22 0x00007f8a00f3429e in nsThread::ProcessNextEvent(bool, bool*) (this=0x7f8a0ab9abb0, aMayWait=<optimized out>, aResult=<optimized out>) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/xpcom/threads/nsThread.cpp:1153
#23 0x00007f8a00f37e38 in NS_ProcessNextEvent(nsIThread*, bool) (aThread=0x1, aThread@entry=0x7f8a0ab9abb0, aMayWait=false) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/xpcom/threads/nsThreadUtils.cpp:548
#24 0x00007f8a015d6868 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (this=0x7f89fcb82f00, aDelegate=0x7f89fc26dc70) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/ipc/glue/MessagePump.cpp:300
#25 0x00007f8a0155cfa6 in MessageLoop::RunInternal() (this=0x80002) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/ipc/chromium/src/base/message_loop.cc:335
#26 MessageLoop::RunHandler() (this=0x80002) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/ipc/chromium/src/base/message_loop.cc:328
#27 MessageLoop::Run() (this=0x80002) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/ipc/chromium/src/base/message_loop.cc:310
#28 0x00007f8a00f31b57 in nsThread::ThreadFunc(void*) (aArg=0x7f89fcb85940) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/xpcom/threads/nsThread.cpp:395
#29 0x00007f8a0ad77cd5 in _pt_root (arg=0x7f89fc08edc0) at /home/alexandre/Documents/codaz/Mozilla/MiscWork/mozilla-source/mozilla-unified/nsprpub/pr/src/pthreads/ptthread.c:201
#30 0x00007f8a0b27fea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#31 0x00007f8a0ae7cdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
There's a socket()
call generated by sctp_userspace_get_mtu_from_ifn
to read MTU, which should not happen.
Comment 1•4 years ago
|
||
I agree, that in this case (using an AF_CONN address) it doesn't make sense, to get the MTU from the system, which seems to require to have a socket. I'll fix this and report back.
Comment 2•4 years ago
|
||
The issue should by fixed in:
- https://github.com/sctplab/usrsctp/commit/7f0e11fa29ad83194b60180fdf64a0ea4908549a
- https://github.com/sctplab/usrsctp/commit/acfce46e428cc084b4bd0164e1b019261a8dbeda
The second commit fixes a compilation error on Windows introduced by the first one. Let me
know if you have any further questions.
Assignee | ||
Comment 3•4 years ago
|
||
(In reply to Michael Tüxen from comment #2)
The issue should by fixed in:
- https://github.com/sctplab/usrsctp/commit/7f0e11fa29ad83194b60180fdf64a0ea4908549a
- https://github.com/sctplab/usrsctp/commit/acfce46e428cc084b4bd0164e1b019261a8dbeda
The second commit fixes a compilation error on Windows introduced by the first one. Let me
know if you have any further questions.
Thanks, I can confirm it's good locally at least, I've pushed it to try with my changes from bug 1434134: https://treeherder.mozilla.org/jobs?repo=try&revision=570cc23ecb13791d34ebf40d85c2e9899f274c0d
Assignee | ||
Comment 4•4 years ago
|
||
Cherry-picked patches from upstream using:
for commit in 7f0e11fa29ad83194b60180fdf64a0ea4908549a acfce46e428cc084b4bd0164e1b019261a8dbeda; do
curl -vsSL https://github.com/sctplab/usrsctp/commit/${commit}.patch | patch -d netwerk/sctp/src/ -p 2;
done;
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
Cherry-picked patches from upstream using:
for commit in 7f0e11fa29ad83194b60180fdf64a0ea4908549a acfce46e428cc084b4bd0164e1b019261a8dbeda; do
curl -vsSL https://github.com/sctplab/usrsctp/commit/${commit}.patch | patch -d netwerk/sctp/src/ -p 2;
done;
Updated•4 years ago
|
Comment 8•4 years ago
|
||
bugherder |
Description
•