freebsd-dev/usr.sbin/bsnmpd/modules
Mikolaj Golub 16c3b091ae In snmp_hostres, device_map table is used for consistent device table
indexing. When a device has gone it is not removed from device_map
table but just its entry_p field is set to NULL.

So when traversing device_map in disk_OS_get_ATA_disks() and
disk_OS_get_MD_disks() check for entry_p being NULL, otherwise the
bsnmpd crash is possible when a removed map entry is dereferenced.

Before the fix, for disk_OS_get_ATA_disks() the crash could be easily
reproduced running:

  atacontrol detach ata1

The crash was not observed in disk_OS_get_MD_disks() because currently
snmp_hostres does no see md(4) disks: to get the device list it uses
devinfo(3), which does not return md devices.

Reported by:	Miroslav Lachman 000.fbsd quip.cz
MFC after:	1 week
2012-09-17 07:32:53 +00:00
..
snmp_atm
snmp_bridge Spelling fixes for usr.sbin/ 2011-12-30 10:58:14 +00:00
snmp_hostres In snmp_hostres, device_map table is used for consistent device table 2012-09-17 07:32:53 +00:00
snmp_mibII Upgrade our copy of llvm/clang to trunk r162107. With thanks to 2012-08-20 18:33:03 +00:00
snmp_netgraph General mdoc(7) and typo fixes. 2012-05-11 20:06:46 +00:00
snmp_pf Merge the projects/pf/head branch, that was worked on for last six months, 2012-09-08 06:41:54 +00:00
snmp_target Bring in a SNMP module that allows configuration of SNMPv3 Notification targets. 2010-12-20 17:13:14 +00:00
snmp_usm In bsnmpd(1) add support for SNMPv3 message processing model, including message authentication, packet encryption & view-based access control (RFC 3412, 3414, 3415). 2010-12-08 13:51:38 +00:00
snmp_vacm In bsnmpd(1) add support for SNMPv3 message processing model, including message authentication, packet encryption & view-based access control (RFC 3412, 3414, 3415). 2010-12-08 13:51:38 +00:00
snmp_wlan General mdoc(7) and typo fixes. 2012-05-11 20:06:46 +00:00
Makefile Bring in a SNMP module that allows configuration of SNMPv3 Notification targets. 2010-12-20 17:13:14 +00:00
Makefile.inc Remove redundant WARNS?=6 overrides and inherit the WARNS setting from 2010-03-02 18:44:08 +00:00