Date: Wed, 14 Jul 2010 18:06:21 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/dev/ipmi ipmi_smbios.c Message-ID: <201007141806.o6EI6cLa084446@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2010-07-14 18:06:21 UTC FreeBSD src repository Modified files: sys/dev/ipmi ipmi_smbios.c Log: SVN rev 210066 on 2010-07-14 18:06:21Z by jhb Rework the SMBIOS table walker to make it operate like other table walkers and remove a buffer overflow: - Remove the array of per-type dispatch functions. Instead, pass each structure to a single callback. The callback should check the type of each table entry to take appropriate action. This matches the behavior of other table walkers such as for the MP Table and MADT. - Don't attempt to save an array of string pointers for each structure entry. Instead, just skip the strings. If this code is reused to provide a generic SMBIOS table walker in the future we could provide a method that looks up a specific string N for a given structure record instead of pre-populating an array of pointers. This fixes a buffer overflow for structure entries with more than 20 strings. PR: kern/148546 Reported by: Spencer Minear @ McAfee MFC after: 3 days Revision Changes Path 1.6 +33 -49 src/sys/dev/ipmi/ipmi_smbios.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007141806.o6EI6cLa084446>