Uploaded image for project: 'LWIP based TCP/IP'
  1. LWIP based TCP/IP
  2. PSLWIP-339

DHCP/BootP XID not properly randomized during firmware startup

    Details

    • Type: Change
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V4.5.0.0
    • Fix Version/s: V4.5.1.0
    • Labels:
      None
    • Account:
      SPC TCP_IP (SPCTCPIP)

      Description

      In the current implementation the DHCP/BOOT XID field will be initialized from the libc rand() call when sending the first DHCP message. In addition the libc RNG is seeded from the devices mac address. This approach has two drawbacks:

      • The XID will be start with same value on each poweron/reset
      • The global libc RNG will be always seeded with the same value when the first dhcp message is sent

      The implementation should be changed such that the global libc RNG is no more seeded by the DHCP protocol implementation. Instead, the implementation should assume that the libc RNG has been properly seeded during firmware startup and just use the rand() function.

      For a conformal behavior of DHCP, the firmware integrator must ensure that the libc RNG is seeded during firmware startup by invoking the srand() function. The seed must be at least a device unique value. (e.g. derived from mac address) An even better seed would also change with every boot cycle. (e.g. derived from netX toolbox)

        Attachments

          Issue Links

            Expenses

              Activity

                Status Description

                  People

                  • Reporter:
                    MBommert Marc Bommert
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    0 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved: