#780 closed defect (fixed)

smartmontools triggers kernel panic on INVARIANTS enabled FreeBSD kernel after r308351 in base

Reported by: op_hardenedbsd Owned by:
Priority: blocker Milestone: Release 6.6
Component: all Version: 6.5
Keywords: freebsd Cc:


Details from ports patch - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215356

smartmontools: fix panic on INVARIANTS enabled kernel after r308351 in base

After r308351 commit the INVARIANTS enabled kernel gets too "eager" when
checking the cam ccb flags. But the real problem was not the previous, but
the smartmontools does not zeroed out the ccb on stack, and pass this
dirty ccb to kernel, which is catched by an ASSERT. So fix this by filling
up with 0 this ccb. This commit is similar, what's happen in r307684
in camcontrol. So this is the same followup patch in smartmontools.


Sponsored-by: opBSD

op@opn ~> smartctl --version
smartctl 6.5 2016-05-07 r4318 [FreeBSD 11.0-STABLE-HBSD amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

smartctl comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
the terms of the GNU General Public License; either
version 2, or (at your option) any later version.
See http://www.gnu.org for further details.

smartmontools release 6.5 dated 2016-05-07 at 11:17:46 UTC
smartmontools SVN rev 4318 dated 2016-05-07 at 11:18:20
smartmontools build host: amd64-portbld-freebsd11.0
smartmontools build with: C++98, GCC 4.2.1 Compatible FreeBSD Clang 3.8.0 (tags/RELEASE_380/final 262564)
smartmontools configure arguments: '--disable-dependency-tracking' '--enable-sample' '--with-nvme-devicescan=yes' '--with-initscriptdir=/usr/local/etc/rc.d' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd11.0' 'build_alias=amd64-portbld-freebsd11.0' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -pipe -DHARDENEDBSD -fstack-protector -fno-strict-aliasing -DHARDENEDBSD' 'LDFLAGS= -fstack-protector' 'LIBS=' 'CPPFLAGS=' 'CC=cc' 'CFLAGS=-O2 -pipe -pipe -DHARDENEDBSD -fstack-protector -fno-strict-aliasing'

Attachments (1)

0001-smartmontools-fix-panic-on-INVARIANTS-enabled-kernel.patch.txt (1.5 KB) - added by op_hardenedbsd 17 months ago.
patch generated against FreeBSD's ports tree

Download all attachments as: .zip

Change History (3)

Changed 17 months ago by op_hardenedbsd

patch generated against FreeBSD's ports tree

comment:1 Changed 17 months ago by Christian Franke

Milestone: Release 6.6

comment:2 Changed 17 months ago by Alex Samorukov

Resolution: fixed
Status: newclosed

thank you, fixed in r4369

Note: See TracTickets for help on using tickets.