-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ospfd: ospfd core if hello packet exceeds link MTU #3657
Conversation
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: FailedNetBSD 7 amd64 build: Successful OmniOS amd64 build: FailedMake failed for OmniOS amd64 build:
OmniOS amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6472/artifact/CI010BUILD/config.status/config.status Warnings Generated during build:Checkout code: Successful with additional warnings:OmniOS amd64 build: FailedMake failed for OmniOS amd64 build:
OmniOS amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6472/artifact/CI010BUILD/config.status/config.status
Warnings Generated during build:Ubuntu 16.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 amd64 build:
Ubuntu 16.04 i386 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 i386 build:
Ubuntu 18.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 18.04 amd64 build:
Debian 8 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 8 amd64 build:
Debian 9 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 9 amd64 build:
Ubuntu 14.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 14.04 amd64 build:
|
b3d7f91
to
022bbe0
Compare
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6475/ This is a comment from an EXPERIMENTAL automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings:
Warnings Generated during build:Ubuntu 16.04 i386 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 i386 build:
Debian 9 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 9 amd64 build:
Ubuntu 16.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 amd64 build:
Ubuntu 14.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 14.04 amd64 build:
Debian 8 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 8 amd64 build:
Ubuntu 18.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 18.04 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base3 Static Analyzer issues remaining.See details at |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
33f615c
to
6802d55
Compare
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: FailedCentOS 6 amd64 build: Successful Ubuntu 16.04 amd64 build: FailedUbuntu 16.04 amd64 build: No useful log found Warnings Generated during build:Checkout code: Successful with additional warnings:Ubuntu 16.04 amd64 build: FailedUbuntu 16.04 amd64 build: No useful log found
Warnings Generated during build:Debian 9 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 9 amd64 build:
Ubuntu 16.04 i386 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 i386 build:
Debian 8 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 8 amd64 build:
Ubuntu 14.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 14.04 amd64 build:
Ubuntu 18.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 18.04 amd64 build:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patch is OK for me once CI/CD error solved
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotest tests on Ubuntu 16.04 i386: Successful Topology tests on Ubuntu 16.04 amd64: FailedTopology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-6478/test Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6478/artifact/TOPOU1604/ErrorLog/log_topotests.txt Topology tests on Ubuntu 18.04 amd64: FailedTopology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1804-6478/test Topology Tests failed for Topology tests on Ubuntu 18.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6478/artifact/TOPOU1804/ErrorLog/log_topotests.txt Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6478/artifact/TOPOU1604/MemoryLeaks/
|
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6479/ This is a comment from an EXPERIMENTAL automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings:
Warnings Generated during build:Debian 9 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 9 amd64 build:
Ubuntu 16.04 i386 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 i386 build:
Debian 8 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 8 amd64 build:
Ubuntu 14.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 14.04 amd64 build:
Ubuntu 16.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 amd64 build:
Ubuntu 18.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 18.04 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base3 Static Analyzer issues remaining.See details at |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
c8d807b
to
9b14232
Compare
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6481/ This is a comment from an EXPERIMENTAL automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings:
Warnings Generated during build:Ubuntu 16.04 i386 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 i386 build:
Ubuntu 14.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 14.04 amd64 build:
Debian 8 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 8 amd64 build:
Debian 9 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 9 amd64 build:
Ubuntu 16.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 amd64 build:
Ubuntu 18.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 18.04 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base3 Static Analyzer issues remaining.See details at |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6482/ This is a comment from an EXPERIMENTAL automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings:
Warnings Generated during build:Ubuntu 16.04 i386 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 i386 build:
Ubuntu 18.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 18.04 amd64 build:
Ubuntu 14.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 14.04 amd64 build:
Debian 8 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 8 amd64 build:
Debian 9 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 9 amd64 build:
Ubuntu 16.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base3 Static Analyzer issues remaining.See details at |
@nitinsoniism Can you please fix the remaining build warnings? |
9b14232
to
02aea13
Compare
@Jafaral, unfortunately, we can't do much about some of these warnings. It is throwing a warning if I break the string across multiple lines and it is considering that as going beyond 80 chars even though it is split across lines. Or maybe I didn't understand the warnings properly. |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedUbuntu 14.04 deb pkg check: Successful IPv4 ldp protocol on Ubuntu 16.04: FailedWarnings Generated during build:Checkout code: Successful with additional warnings:IPv4 ldp protocol on Ubuntu 16.04: Failed
Warnings Generated during build:Ubuntu 16.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 amd64 build:
Ubuntu 16.04 i386 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 i386 build:
Ubuntu 18.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 18.04 amd64 build:
Debian 8 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 8 amd64 build:
Debian 9 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 9 amd64 build:
Ubuntu 14.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 14.04 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base3 Static Analyzer issues remaining.See details at |
Ospfd cored because of an assert when we try to write more than the MTU size to the ospf packet buffer stream. The problem is - we allocate only MTU sized buffer. The expectation is that Hello packets are never large enough to approach MTU. Instead of crashing, this fix discards hello and logs an error. One should not have so many neighbors behind an interface. Ticket: CM-22380 Signed-off-by: Nitin Soni <nsoni@cumulusnetworks.com> Reviewed-by: CCR-8204
02aea13
to
9b18d58
Compare
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6508/ This is a comment from an EXPERIMENTAL automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings:
Warnings Generated during build:Debian 9 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 9 amd64 build:
Ubuntu 16.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 amd64 build:
Ubuntu 14.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 14.04 amd64 build:
Ubuntu 16.04 i386 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 i386 build:
Debian 8 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 8 amd64 build:
Ubuntu 18.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 18.04 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base3 Static Analyzer issues remaining.See details at |
Ospfd cored because of an assert when we try to write more than the MTU
size to the ospf packet buffer stream. The problem is - we allocate only MTU
sized buffer. The expectation is that Hello packets are never large
enough to approach MTU.
Ticket: CM-22380
Signed-off-by: Nitin Soni nsoni@cumulusnetworks.com
Reviewed-by: CCR-8204
Summary
[While forming hello packet, ospfd loops through neighbors and fills in the information in the stream. If there are more than 365 neighbors, hello packet size goes beyond MTU. We allocate only MTU sized buffer. While calling stream_put_ipv4() in ospf_make_hello(), we abort() leading to a crash. Instead of crashing, this fix discards hello and logs an error. One should not have so many neighbors behind an interface.
Core dump backtrace -
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f73d2c30067 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#0 0x00007f73d2c30067 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1 0x00007f73d2c31448 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2 0x00007f73d417d896 in _zlog_assert_failed (assertion=assertion@entry=0x7f73d41c1f12 "0", file=file@entry=0x7f73d41c17b9 "lib/stream.c", line=line@entry=814, function=function@entry=0x7f73d41c1b80 <func.12224> "stream_put_ipv4") at lib/log.c:713
No locals.
#3 0x00007f73d41991dc in stream_put_ipv4 (s=s@entry=0xd458acbfa0, l=1828782278) at lib/stream.c:814
func = "stream_put_ipv4"
#4 0x000000d456235b9c in ospf_make_hello (s=0xd458acbfa0, oi=0xd456fea670) at ospfd/ospf_packet.c:3321
rn = 0xd458ab8f80
length =
mask = {s_addr = 65535}
flag = 0
nbr =
p = 40
#5 ospf_hello_send_sub (oi=0xd456fea670, addr=83886304) at ospfd/ospf_packet.c:3589
op = 0xd458acbbe0
length = 24
PRETTY_FUNCTION = "ospf_hello_send_sub"
#6 0x000000d456227d00 in ospf_hello_timer (thread=) at ospfd/ospf_ism.c:257
oi = 0xd456fea670
#7 0x00007f73d419f380 in thread_call (thread=thread@entry=0x7ffc58a12bf0) at lib/thread.c:1552
realtime =
cputime = 0
before = {cpu = {ru_utime = {tv_sec = 0, tv_usec = 34000}, ru_stime = {tv_sec = 0, tv_usec = 240000}, {ru_maxrss = 35228, __ru_maxrss_word = 35228}, {ru_ixrss = 0, __ru_ixrss_word = 0}, {ru_idrss = 0, __ru_idrss_word = 0}, {ru_isrss = 0, __ru_isrss_word = 0}, {ru_minflt = 16539, __ru_minflt_word = 16539}, {ru_majflt = 0, __ru_majflt_word = 0}, {ru_nswap = 0, __ru_nswap_word = 0}, {ru_inblock = 0, __ru_inblock_word = 0}, {ru_oublock = 0, __ru_oublock_word = 0}, {ru_msgsnd = 0, __ru_msgsnd_word = 0}, {ru_msgrcv = 0, __ru_msgrcv_word = 0}, {ru_nsignals = 0, __ru_nsignals_word = 0}, {ru_nvcsw = 396, __ru_nvcsw_word = 396}, {ru_nivcsw = 9, __ru_nivcsw_word = 9}}, real = {tv_sec = 247470, tv_usec = 640268}}
after = {cpu = {ru_utime = {tv_sec = 911988307000, tv_usec = 34000}, ru_stime = {tv_sec = 640255, tv_usec = 911988307200}, {ru_maxrss = 0, __ru_maxrss_word = 0}, {ru_ixrss = 0, __ru_ixrss_word = 0}, {ru_idrss = 0, __ru_idrss_word = 0}, {ru_isrss = 2, __ru_isrss_word = 2}, {ru_minflt = 247470, __ru_minflt_word = 247470}, {ru_majflt = 640255150, __ru_majflt_word = 640255150}, {ru_nswap = 1, __ru_nswap_word = 1}, {ru_inblock = 0, __ru_inblock_word = 0}, {ru_oublock = 0, __ru_oublock_word = 0}, {ru_msgsnd = 0, __ru_msgsnd_word = 0}, {ru_msgrcv = 0, __ru_msgrcv_word = 0}, {ru_nsignals = 0, __ru_nsignals_word = 0}, {ru_nvcsw = 395, __ru_nvcsw_word = 395}, {ru_nivcsw = 9, __ru_nivcsw_word = 9}}, real = {tv_sec = 247470, tv_usec = 7357964613805746176}}
#8 0x00007f73d417adc8 in frr_run (master=0xd456bd3400) at lib/libfrr.c:920
instanceinfo = '\000' <repeats 63 times>
func = "frr_run"
thread = {type = 4 '\004', add_type = 2 '\002', next = 0x0, prev = 0x0, ref = 0xd456fea718, master = 0xd456bd3400, func = 0xd456227cd0 <ospf_hello_timer>, arg = 0xd456fea670, u = {val = 247470, fd = 247470, sands = {tv_sec = 247470, tv_usec = 640255}}, index = 0, real = {tv_sec = 247470, tv_usec = 640268}, hist = 0xd456ffe890, yield = 10000, funcname = 0xd45627bddf "(ospf_hello_timer)", schedfrom = 0xd45627bdf2 "ospfd/ospf_ism.c", schedfrom_line = 260, mtx = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}}
#9 0x000000d456220753 in main (argc=, argv=0x7ffc58a12e18) at ospfd/ospf_main.c:225
instance = 0
]
Related Issue
[fill here if applicable]
Components
[ospfd]