summaryrefslogtreecommitdiff
path: root/proto_lldp.c
AgeCommit message (Collapse)AuthorFilesLines
2020-05-04proto_lldp: prevent accidental out of bounds memory accessNathaniel Ferguson1-1/+5
Added an integer arithmetic check prior to performing arithmetic to prevent accidental out of bounds memory access. Signed-off-by: Nathaniel Ferguson <nathaniel@leapfrog.foundation> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2020-05-04proto_lldp: fix pointer increment in LLDP_TLV_SYSTEM_CAP caseNathaniel Ferguson1-1/+1
Fixed a typo wherein a pointer was incremented by sizeof(uint32_t) after reading sizeof(uint16_t) and before reading another sizeof(uint16_t). In essence a potential out of bounds memory access (read) due to improper increment of pointer Signed-off-by: Nathaniel Ferguson <nathaniel@leapfrog.foundation> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2020-05-04proto_lldp: Check inet_ntop() return valuesNathaniel Ferguson1-3/+11
Make netsniff error out of a recv routine if calls to inet_ntop() fail by adding return value checks. There are other inet_ntop() usages of similar however these are in a receive code path with user data for most of the variables Signed-off-by: Nathaniel Ferguson <nathaniel@leapfrog.foundation> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-11-16lookup: Use lookup module for OUI lookup as wellTobias Klauser1-1/+1
Do not needlessly duplicate code between the oui and the lookup module. Instead, add an additional lookup table for OUIs to the lookup module. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-09-24all: Fix some typos in comments and printed stringsTobias Klauser1-1/+1
All found using codespell. s/addres/address/ s/noone/no one/ s/endianess/endianness/ s/Successfull/Successful/ Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-08-15dissectors: Remove unnecessary includes of dissector_eth.hTobias Klauser1-0/+1
dissector_eth.h is only used in dissectors which need to manipulate the eth_lay2 and eth_lay3 hash tables. Remove the include from all dissectors that don't access them. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-02-24dissectors: Get rid of unecessary includes of protos.hTobias Klauser1-1/+0
This header is actually only needed in dissector_eth and dissector_80211, so remove the other users accordingly. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-06-14dissector: lldp: Rework capability printingTobias Klauser1-8/+14
Make printing of capabilities a bit more intuitive by removing the inline post-increment. This should also make the Coverity scanner happy about this particular part. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-06-04xutils: eliminate xutils, move rest to epoll2Daniel Borkmann1-1/+0
Finally eliminate xutils.{c,h} and move the rest to epoll2. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-05-12dissector: lldp: NULL check before dereferenceTobias Klauser1-2/+10
Check return value of pkt_pull before dereferencing it (even though we check the packet length before and pkt_pull _should_ never return NULL). This was discovered by the coverity scanner. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-03-15all: import netsniff-ng 0.5.8-rc0 sourceDaniel Borkmann1-0/+469
We decided to get rid of the old Git history and start a new one for several reasons: *) Allow / enforce only high-quality commits (which was not the case for many commits in the history), have a policy that is more close to the one from the Linux kernel. With high quality commits, we mean code that is logically split into commits and commit messages that are signed-off and have a proper subject and message body. We do not allow automatic Github merges anymore, since they are total bullshit. However, we will either cherry-pick your patches or pull them manually. *) The old archive was about ~27MB for no particular good reason. This basically derived from the bad decision that also some PDF files where stored there. From this moment onwards, no binary objects are allowed to be stored in this repository anymore. The old archive is not wiped away from the Internet. You will still be able to find it, e.g. on git.cryptoism.org etc. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>