Opened 8 years ago

Closed 8 years ago

#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:

Description

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.


https://svnweb.freebsd.org/base?view=revision&revision=307684
https://svnweb.freebsd.org/base?view=revision&revision=308351


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 8 years ago.
patch generated against FreeBSD's ports tree

Download all attachments as: .zip

Change History (3)

by op_hardenedbsd, 8 years ago

patch generated against FreeBSD's ports tree

comment:1 by Christian Franke, 8 years ago

Milestone: Release 6.6

comment:2 by Alex Samorukov, 8 years ago

Resolution: fixed
Status: newclosed

thank you, fixed in r4369

Note: See TracTickets for help on using tickets.