We current test asan in Chrome OS builds (limited packages). Should add ubsan as well to improve Chrome OS quality and pre-emptively find bugs.
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/a6b00968f69daea2e656257e062be27ec33c357c commit a6b00968f69daea2e656257e062be27ec33c357c Author: Manoj Gupta <manojgupta@google.com> Date: Mon Aug 20 20:28:43 2018 chromeos_config: Start testing ubsan builds. We want to start testing ubsan in Chrome OS in addition to asan testing we have right now. BUG= chromium:875971 TEST=chromite unit tests pass. Change-Id: I3a47a49bbf536396c87d921c9cc8c869c10c23de Reviewed-on: https://chromium-review.googlesource.com/1182121 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Don Garrett <dgarrett@chromium.org> [modify] https://crrev.com/a6b00968f69daea2e656257e062be27ec33c357c/config/chromeos_config.py [modify] https://crrev.com/a6b00968f69daea2e656257e062be27ec33c357c/config/waterfall_layout_dump.txt [modify] https://crrev.com/a6b00968f69daea2e656257e062be27ec33c357c/config/config_dump.json [modify] https://crrev.com/a6b00968f69daea2e656257e062be27ec33c357c/config/luci-scheduler.cfg
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/2ffcdb5634a3c4910165b30d689a950324d0217a commit 2ffcdb5634a3c4910165b30d689a950324d0217a Author: Manoj Gupta <manojgupta@google.com> Date: Tue Aug 21 08:35:31 2018 Migrate packages to use sanitizers-setup-env. Call sanitizers-setup-env instead of asan-setup-env. This will let us test more packages with ubsan/msan etc. BUG= chromium:875971 BUG=chromium:874179 TEST=packages still build wth USE=asan Change-Id: I2fcfecbcb900ba0d335a0c25e2343fb36f36c654 Reviewed-on: https://chromium-review.googlesource.com/1181945 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/libscrypt/libscrypt-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/mttools/mttools-9999.ebuild [rename] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/net-libs/librmnetctl/librmnetctl-1.0_p20180801-r2.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/dev-util/turbostat/turbostat-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/factory_installer/factory_installer-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/media-libs/libmtp/libmtp-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/dev-python/btsocket/btsocket-9999.ebuild [rename] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/minijail/minijail-1-r20.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/dev-libs/dbus-c++/dbus-c++-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/tpm/tpm-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/net-misc/tlsdate/tlsdate-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/sys-apps/frecon/frecon-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/sys-apps/rootdev/rootdev-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/autotest-deps-glmark2/autotest-deps-glmark2-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/avtest_label_detect/avtest_label_detect-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/sys-apps/bootcache/bootcache-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/media-sound/adhd/adhd-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/gestures/gestures-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/app-crypt/trousers/trousers-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/net-misc/modemmanager-next/modemmanager-next-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/net-libs/libqmi/libqmi-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/gobi3k-sdk/gobi3k-sdk-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/sys-apps/frecon-lite/frecon-lite-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/net-wireless/gdmwimax/gdmwimax-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/net-wireless/bluez/bluez-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/net-libs/libmbim/libmbim-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/minijail/minijail-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/media-libs/minigbm/minigbm-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/media-libs/arc-camera-service/arc-camera-service-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/net-libs/libqrtr/libqrtr-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/smogcheck/smogcheck-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/touch_firmware_test/touch_firmware_test-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/audiotest/audiotest-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/chromeos-base/libevdev/libevdev-9999.ebuild [modify] https://crrev.com/2ffcdb5634a3c4910165b30d689a950324d0217a/net-libs/librmnetctl/librmnetctl-1.0_p20180801.ebuild
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/6e91daef23607d39f3fe656831ad28c95447efcd commit 6e91daef23607d39f3fe656831ad28c95447efcd Author: Manoj Gupta <manojgupta@google.com> Date: Tue Aug 21 08:35:57 2018 cros-sanitizers: Update ubsan flags. Disable testing vptr behavior with ubsan since many packages don't build. Also update filter_sanitizers to filter compiler options starting with "-fno-sanitize". Also modify *SAN_OPTIONS to use stderr log path. BUG= chromium:875971 BUG=chromium:874179 TEST=packages build without USE=ubsan Change-Id: I720201d3ca15a7d536fcd5fe4a21ed88580e7bfc Reviewed-on: https://chromium-review.googlesource.com/1181938 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> [modify] https://crrev.com/6e91daef23607d39f3fe656831ad28c95447efcd/profiles/base/profile.bashrc [modify] https://crrev.com/6e91daef23607d39f3fe656831ad28c95447efcd/eclass/cros-sanitizers.eclass
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/dd0fe897461589844c9313444c6ee8d74a5fdf6f commit dd0fe897461589844c9313444c6ee8d74a5fdf6f Author: Manoj Gupta <manojgupta@google.com> Date: Tue Aug 21 08:36:04 2018 common-mk: Update ubsan flags. Disable vptr sanitization in ubsan. This matches Chromium and ubsan-setup-env in CL:1181938. BUG= chromium:875971 BUG=chromium:874179 TEST=packages build without USE=ubsan Change-Id: I660e454c970e910b1b4e8f9762300b6243ae7d33 Reviewed-on: https://chromium-review.googlesource.com/1182503 Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/dd0fe897461589844c9313444c6ee8d74a5fdf6f/common-mk/common_fuzzer.gypi
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/chromeos-partner-overlay/+/ce556b53ee392ab55319af2f16de7668a79c4227 commit ce556b53ee392ab55319af2f16de7668a79c4227 Author: Manoj Gupta <manojgupta@google.com> Date: Tue Aug 21 17:33:53 2018
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/chromeos-partner-overlay/+/dd2494181bce76e4342ac0d5d3acde4c1fbd2222 commit dd2494181bce76e4342ac0d5d3acde4c1fbd2222 Author: Manoj Gupta <manojgupta@google.com> Date: Wed Aug 22 07:10:42 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/71d778b54d440bfa51cbe799e4799801242555f5 commit 71d778b54d440bfa51cbe799e4799801242555f5 Author: Manoj Gupta <manojgupta@google.com> Date: Wed Aug 22 07:10:41 2018 Migrate asan-setup-env to sanitizers-setup-env Move a few remaining packages to call sanitizers-setup-env instead of asan-setup-env. BUG= chromium:875971 BUG=chromium:874179 TEST=packages still build wth USE=asan Change-Id: Iec26e66b10bc2048995a9139fea20fdf6388ad7e Reviewed-on: https://chromium-review.googlesource.com/1184176 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Caroline Tice <cmtice@chromium.org> [rename] https://crrev.com/71d778b54d440bfa51cbe799e4799801242555f5/net-misc/rmtfs/rmtfs-0.3_p20180711-r4.ebuild [modify] https://crrev.com/71d778b54d440bfa51cbe799e4799801242555f5/net-misc/qmi-ping/qmi-ping-0.1_p20180606.ebuild [modify] https://crrev.com/71d778b54d440bfa51cbe799e4799801242555f5/net-misc/rpmsgexport/rpmsgexport-0.1_p20180228.ebuild [rename] https://crrev.com/71d778b54d440bfa51cbe799e4799801242555f5/net-misc/qmi-ping/qmi-ping-0.1_p20180606-r2.ebuild [modify] https://crrev.com/71d778b54d440bfa51cbe799e4799801242555f5/net-misc/rmtfs/rmtfs-0.3_p20180711.ebuild [rename] https://crrev.com/71d778b54d440bfa51cbe799e4799801242555f5/net-misc/rpmsgexport/rpmsgexport-0.1_p20180228-r2.ebuild
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/b5435ef179f25b2cea9efb4b678cef6c895461d3 commit b5435ef179f25b2cea9efb4b678cef6c895461d3 Author: Manoj Gupta <manojgupta@google.com> Date: Thu Aug 23 14:37:09 2018 amd64-generic: Drop use of -fsanitize=function fom ubsan. Match the ubsan flags used in CL:1185881. BUG= chromium:875971 TEST=ubsan builds still work. Change-Id: I70f5832a72bcbaedd8b37d46d0091e1b9f3bdf9d Reviewed-on: https://chromium-review.googlesource.com/1185884 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Jonathan Metzman <metzman@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/b5435ef179f25b2cea9efb4b678cef6c895461d3/overlay-amd64-generic/profiles/ubsan-fuzzer/make.defaults
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/chromeos-overlay/+/aada0f2616eb0529cbb8108da91ac886afe5e285 commit aada0f2616eb0529cbb8108da91ac886afe5e285 Author: Manoj Gupta <manojgupta@google.com> Date: Thu Aug 23 14:37:01 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/23eb40e8c10d2fd71f623e900d2ae08e898c46cb commit 23eb40e8c10d2fd71f623e900d2ae08e898c46cb Author: Manoj Gupta <manojgupta@google.com> Date: Thu Aug 23 20:20:40 2018 cros-sanitizers: Drop -fsanitize=function from ubsan This is causing fails in libbrillo because of use of callback functionality from libbase. May re-enable later on if deemed important. BUG= chromium:875971 TEST=libbrillo unit tests pass. Change-Id: Ie6244823f8dc4d17106fc20053327e2c146730fe Reviewed-on: https://chromium-review.googlesource.com/1185881 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Jonathan Metzman <metzman@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/23eb40e8c10d2fd71f623e900d2ae08e898c46cb/eclass/cros-sanitizers.eclass
Ubsan builder is running and found a few bugs already. https://cros-goldeneye.corp.google.com/chromeos/legoland/builderHistory?buildConfig=amd64-generic-ubsan&buildBranch=master
The following revision refers to this bug: https://chromium.googlesource.com/aosp/platform/system/connectivity/shill/+/b37c8dbf46ceed78f480ac02dfdb051a4355406f commit b37c8dbf46ceed78f480ac02dfdb051a4355406f Author: Manoj Gupta <manojgupta@google.com> Date: Sat Sep 01 17:40:01 2018 shill: Fix an alignment error reported by ubsan. Fix an misaligned reference binding caught by turning on ubsan in Chrome OS. Fortunately, the error is in the unit test only. Root cause is kIcmpEchoRequestOddLen is cast to struct icmphdr but it doesn't match the alignment needed by struct icmphdr. aosp/system/connectivity/shill/icmp_unittest.cc:213:3: runtime error: reference binding to misaligned address 0x55f46f0c1ace for type 'const struct icmphdr', which requires 4 byte alignment * 0x55f46f0c1ace: note: pointer points here * 00 00 4a ae 08 00 00 00 ac 51 00 00 00 00 01 00 00 00 00 00 00 00 4e 35 73 68 69 6c 6c 32 35 49 * ^ * #0 0x55f46d0357ff in shill::IcmpTest_ComputeIcmpChecksum_Test::TestBody() shill-0.0.3/aosp/system/connectivity/shill/icmp_unittest.cc:213:3 BUG= chromium:878862 BUG= chromium:875971 Change-Id: Id15b7f169668b9978520a5fdcfa0df91d4c2d5c6 Reviewed-on: https://chromium-review.googlesource.com/1195583 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Ben Chan <benchan@chromium.org> [modify] https://crrev.com/b37c8dbf46ceed78f480ac02dfdb051a4355406f/icmp_test.cc
Comment 1 by bugdroid1@chromium.org
, Aug 20