1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-04 17:15:50 +00:00
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
..
2012-09-14 17:50:42 +00:00
2012-08-16 20:54:52 +00:00
2012-09-14 21:28:56 +00:00
2011-11-06 16:40:17 +00:00
2012-05-22 16:33:10 +00:00
2012-06-27 04:39:30 +00:00
2012-07-13 21:27:18 +00:00
2012-03-26 21:22:53 +00:00
2012-03-26 15:18:14 +00:00
2012-05-22 16:33:10 +00:00
2012-09-16 15:22:15 +00:00
2011-12-30 10:58:14 +00:00
2012-09-01 10:56:15 +00:00
2012-09-11 07:54:41 +00:00
2012-08-31 16:57:16 +00:00
2012-06-20 17:20:25 +00:00
2010-12-20 08:54:30 +00:00
2012-03-25 09:18:34 +00:00
2012-03-25 09:18:34 +00:00
2012-05-18 14:12:17 +00:00
2012-05-17 11:50:12 +00:00
2012-06-03 11:29:48 +00:00
2012-05-12 03:25:46 +00:00
2010-12-20 09:36:54 +00:00
2012-07-04 10:17:02 +00:00
2012-05-12 15:08:22 +00:00
2012-09-08 08:46:43 +00:00
2012-07-09 15:44:35 +00:00
2011-12-30 10:58:14 +00:00
2012-09-11 07:35:24 +00:00
2011-12-30 10:58:14 +00:00
2012-09-14 17:50:42 +00:00
2011-08-06 09:11:30 +00:00
2012-06-03 11:29:48 +00:00
2012-09-14 21:28:56 +00:00
2012-09-12 10:16:39 +00:00
2012-03-10 14:38:34 +00:00
2012-03-26 21:22:53 +00:00
2012-07-18 23:32:12 +00:00