Why I did it the strcpy and buffer allocation is not safe, it corrupts 1 byte on the stack. Depending on the memory layout, it may or may not cause issue immediately. message type is not validated before updating the counter. Which could cause segment fault. How I did it Remove the unsafe strcpy, use config->interface.c_str() instead. Check message type before updating counters. How to verify it The issue (1) caused segment fault on a specific platform. The fix was validated there. Issue (2) was precautionary. Added log in case it triggers. |
||
---|---|---|
.. | ||
bash | ||
dhcp6relay | ||
dhcpmon | ||
ethtool | ||
flashrom | ||
gobgp | ||
hiredis | ||
iccpd | ||
ifupdown2 | ||
initramfs-tools | ||
iproute2 | ||
iptables | ||
isc-dhcp | ||
ixgbe | ||
kdump-tools | ||
libnl3 | ||
libteam | ||
libyang | ||
libyang1 | ||
linkmgrd@0c23756cd6 | ||
lldpd | ||
lm-sensors | ||
monit | ||
mpdecimal | ||
ntp | ||
openssh | ||
ptf@36a3e3d9ac | ||
radius | ||
redis | ||
redis-dump-load@7585497951 | ||
redis-dump-load.patch | ||
sflow | ||
smartmontools | ||
snmpd | ||
socat | ||
sonic-bgpcfgd | ||
sonic-build-hooks | ||
sonic-config-engine | ||
sonic-ctrmgrd | ||
sonic-dbsyncd@df46ed418e | ||
sonic-device-data | ||
sonic-frr | ||
sonic-frr-mgmt-framework | ||
sonic-host-services | ||
sonic-host-services-data | ||
sonic-linux-kernel@6aa8d00afd | ||
sonic-mgmt-common@d43a607d75 | ||
sonic-mgmt-framework@3c3384cec8 | ||
sonic-p4rt | ||
sonic-platform-common@ee122155e0 | ||
sonic-platform-daemons@94fa239a7b | ||
sonic-platform-pde@f18ebc297d | ||
sonic-py-common | ||
sonic-py-swsssdk@2cd6236849 | ||
sonic-restapi@94805a39ac | ||
sonic-sairedis@d5866a3dcc | ||
sonic-snmpagent@a07da53618 | ||
sonic-swss@6cb43ee25c | ||
sonic-swss-common@405f1df3d4 | ||
sonic-telemetry@0443e66050 | ||
sonic-utilities@d9f3afe5b3 | ||
sonic-yang-mgmt | ||
sonic-yang-models | ||
sonic-ztp@f7dd3c54ec | ||
swig | ||
system-health | ||
systemd-sonic-generator | ||
tacacs | ||
thrift | ||
thrift_0_13_0 | ||
wpasupplicant |