Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-12671

BMP parse error for path attribute MP_UNREACH_NLRI

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 26.0.0
    • Fix Version/s: 26.1.0
    • Component/s: Telemetry
    • Security Level: Default (Default Security Scheme)
    • Labels:

      Description

      Another parsing error occurs for path attribute MP_UNREACH_NLRI:

      2020-04-16T20:54:13,273 | DEBUG | nioEventLoopGroup-3-31 | TcpListener                      | 311 - org.opennms.features.telemetry.listeners - 26.1.0.SNAPSHOT | 
      io.netty.handler.codec.DecoderException: org.opennms.netmgt.telemetry.protocols.bmp.parser.InvalidPacketException: Error parsing packet
              at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468) ~[?:?]
              at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) ~[?:?]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93) [116:io.netty.transport:4.1.48.Final]
              at org.opennms.netmgt.telemetry.listeners.TcpListener$1$4.channelRead(TcpListener.java:108) [311:org.opennms.features.telemetry.listeners:26.1.0.SNAPSHOT]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [116:io.netty.transport:4.1.48.Final]
              at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [116:io.netty.transport:4.1.48.Final]
              at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [112:io.netty.common:4.1.48.Final]
              at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [112:io.netty.common:4.1.48.Final]
              at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [112:io.netty.common:4.1.48.Final]
              at java.lang.Thread.run(Thread.java:834) [?:?]
      Caused by: org.opennms.netmgt.telemetry.protocols.bmp.parser.InvalidPacketException: Error parsing packet
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.pathattr.MultiprotocolUnreachableNlri.<init>(MultiprotocolUnreachableNlri.java:63) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.UpdatePacket$PathAttribute$Type$19.parse(UpdatePacket.java:279) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.UpdatePacket$PathAttribute.<init>(UpdatePacket.java:163) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.UpdatePacket.lambda$new$1(UpdatePacket.java:86) ~[?:?]
              at org.opennms.netmgt.telemetry.listeners.utils.BufferUtils.repeatRemaining(BufferUtils.java:182) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.UpdatePacket.<init>(UpdatePacket.java:86) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.UpdatePacket.parse(UpdatePacket.java:335) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bmp.packets.RouteMonitoringPacket.<init>(RouteMonitoringPacket.java:55) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bmp.Header$Type.parse(Header.java:101) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bmp.Header$Type.access$100(Header.java:83) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bmp.Header.parsePayload(Header.java:80) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.BmpParser$1.parse(BmpParser.java:223) ~[?:?]
              at org.opennms.netmgt.telemetry.listeners.TcpListener$1$3.decode(TcpListener.java:116) ~[?:?]
              at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:498) ~[?:?]
              at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:437) ~[?:?]
              ... 22 more
      Caused by: java.lang.IndexOutOfBoundsException: readerIndex(527) + length(1) exceeds writerIndex(527): UnpooledSlicedByteBuf(ridx: 527, widx: 527, cap: 527/527, unwrapped: PooledUnsafeDirectByteBuf(ridx: 711, widx: 3798, cap: 4096))
              at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1477) ~[?:?]
              at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:731) ~[?:?]
              at io.netty.buffer.AbstractByteBuf.readUnsignedByte(AbstractByteBuf.java:745) ~[?:?]
              at org.opennms.netmgt.telemetry.listeners.utils.BufferUtils.uint24(BufferUtils.java:113) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.pathattr.MultiprotocolReachableNlri.decodeLabel(MultiprotocolReachableNlri.java:250) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.pathattr.MultiprotocolReachableNlri.lambda$parseNlriData_LabelIPv4IPv6$3(MultiprotocolReachableNlri.java:206) ~[?:?]
              at org.opennms.netmgt.telemetry.listeners.utils.BufferUtils.repeatRemaining(BufferUtils.java:182) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.pathattr.MultiprotocolReachableNlri.parseNlriData_LabelIPv4IPv6(MultiprotocolReachableNlri.java:194) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.pathattr.MultiprotocolUnreachableNlri.parseAfi_IPv4IPv6(MultiprotocolUnreachableNlri.java:96) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.pathattr.MultiprotocolUnreachableNlri.parseAfi(MultiprotocolUnreachableNlri.java:73) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.pathattr.MultiprotocolUnreachableNlri.<init>(MultiprotocolUnreachableNlri.java:59) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.UpdatePacket$PathAttribute$Type$19.parse(UpdatePacket.java:279) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.UpdatePacket$PathAttribute.<init>(UpdatePacket.java:163) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.UpdatePacket.lambda$new$1(UpdatePacket.java:86) ~[?:?]
              at org.opennms.netmgt.telemetry.listeners.utils.BufferUtils.repeatRemaining(BufferUtils.java:182) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.UpdatePacket.<init>(UpdatePacket.java:86) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bgp.packets.UpdatePacket.parse(UpdatePacket.java:335) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bmp.packets.RouteMonitoringPacket.<init>(RouteMonitoringPacket.java:55) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bmp.Header$Type.parse(Header.java:101) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bmp.Header$Type.access$100(Header.java:83) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.proto.bmp.Header.parsePayload(Header.java:80) ~[?:?]
              at org.opennms.netmgt.telemetry.protocols.bmp.parser.BmpParser$1.parse(BmpParser.java:223) ~[?:?]
              at org.opennms.netmgt.telemetry.listeners.TcpListener$1$3.decode(TcpListener.java:116) ~[?:?]
              at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:498) ~[?:?]
              at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:437) ~[?:?]
              ... 22 more
      

        Attachments

          Activity

            People

            Assignee:
            cpape Christian Pape
            Reporter:
            cpape Christian Pape
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: