Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-40245

lldpd: No range checking setting tx-interval and tx-hold

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-9.6
    • rhel-9.5
    • lldpd
    • lldpd-1.0.18-5.el9
    • None
    • Moderate
    • rhel-sst-networking-core
    • ssg_networking
    • 10
    • 16
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Requested
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      While doing range checking of lldp configuration properties using lldpcli I found the software silently accepts invalid values for tx-hold and tx-interval.

      Per the IEEE 802.1AB standard, tx-hold should be between 1 and 100 (Clause 9.2.5.6) and tx-interval should be between 1 and 3600 (Clause 9.2.5.7).

      These values are multiplied to determine a "time to live" which is limited to the range 0-65535, with too-large numbers essentially resulting a modulo to determine the TTL (e.g: tx-interval of 3600 and tx-hold of 20 result in a TTL of 6464).

      Trying to set either value to 0 is ignored with no error, although since it would result in a TTL of 0 which means "forget me" (Clause 8.5.4) it doesn't actually break anything.

      While no error messages are returned, tx-hold can be configured with values up to 1569325056 and tx-interval is taking values up to 1661993.

      Please provide the package NVR for which bug is seen:

      lldpd-1.0.18-3.el9.x86_64

      How reproducible:

      Always

      Steps to reproduce

      1. With lldpd running , use lldpcli to set tx-hold and tx-interval to values which violate the standard
      2. Observe: no errors are returned
      3. Set tx-hold and tx-interval to values which will result in a TTL larger than 65535
      4. Observe: TTL is set to (tx-interval & tx-hold) % 65536.

      Expected results

      There should be some validation while setting tx-interval and tx-hold to comply with the standard

      Actual results

      There is no validation or error messaging when configuring lldpd with illegal values.

              haliu@redhat.com Hangbin Liu
              malucius@redhat.com Matt Lucius
              Hangbin Liu Hangbin Liu
              Fei Liu Fei Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: