Skip to content

Crash when (wrongly) unapplying a policer #3681

@jerome-labidurie

Description

@jerome-labidurie

A crash occurs in VPP when a policer is unapplied from an interface
with an index greater than the highest interface index to which a
policer has been applied.

Reproduction:

DBGvpp# create loopback interface 
loop0
DBGvpp# create loopback interface 
loop1
DBGvpp# policer add name p1 rate kbps cir 5000 cb 100000 conform-action transmit
DBGvpp# policer input unapply name p1 loop1
Code:  c7 04 88 ff ff ff ff 83 7d f0 00 75 28 8b 55 f4 8a 45 ef 24
#0  0x0000788c746e0248 policer_input + 0xc8
     from /lib/x86_64-linux-gnu/libvnet.so.25.06
#1  0x0000788c746e4a71 policer_input_command_fn + 0x251
     from /lib/x86_64-linux-gnu/libvnet.so.25.06
#2  0x0000788c7445cbe6 vlib_cli_dispatch_sub_commands + 0xd26
     from /lib/x86_64-linux-gnu/libvlib.so.25.06
#3  0x0000788c7445c9ae vlib_cli_dispatch_sub_commands + 0xaee
     from /lib/x86_64-linux-gnu/libvlib.so.25.06
#4  0x0000788c7445bcfa vlib_cli_input + 0x8a
     from /lib/x86_64-linux-gnu/libvlib.so.25.06
#5  0x0000788c744cc8b9 unix_cli_process_input + 0x519
     from /lib/x86_64-linux-gnu/libvlib.so.25.06
#6  0x0000788c744cab6b unix_cli_process + 0xab
     from /lib/x86_64-linux-gnu/libvlib.so.25.06
#7  0x0000788c744842ad vlib_process_bootstrap + 0x5d
     from /lib/x86_64-linux-gnu/libvlib.so.25.06
#8  0x0000788c7437d3c8
     from /lib/x86_64-linux-gnu/libvppinfra.so.25.06
Aborted (core dumped)

a fix is proposed here https://gerrit.fd.io/r/c/vpp/+/44843

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions