]> git.puffer.fish Git - matthieu/frr.git/commit
lib: crash when FRR hostname length > 80 chars
authorLakshman Krishnamoorthy <lkrishnamoor@vmware.com>
Thu, 30 May 2019 21:56:55 +0000 (14:56 -0700)
committerLakshman Krishnamoorthy <lkrishnamoor@vmware.com>
Fri, 31 May 2019 17:52:33 +0000 (10:52 -0700)
commit63e653a21f59a17810d597ec35b20fb13bae6692
treea9927f2c17804c1eb815ceef886c4f9ba866252b
parent979dd989c46c318ad489d3be9219383ba19980ae
lib: crash when FRR hostname length > 80 chars

Although the RFC states hostname length should be < 255 chars,
FRR allows infinite length technically. However, when you try
to set a hostname > 80 chars, you would immediately notice a crash.

RCA: Crash due to buffer overflow. Large buffer sprintf'd into smaller
buffer. Usage of sprintf function instead of snprintf which is safer.

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
lib/command.c
lib/command.h
vtysh/vtysh.c
vtysh/vtysh_config.c