1 #############################################################################
2 # UBSan vptr blacklist.
3 # Function and type based blacklisting use a mangled name, and it is especially
4 # tricky to represent C++ types. For now, any possible changes by name manglings
5 # are simply represented as wildcard expressions of regexp, and thus it might be
8 #############################################################################
10 # If base and derived classes have identifical memory layouts (i.e., the same
11 # object size) and both have no virtual functions, we blacklist them as there
12 # would be not much security implications.
14 fun:*LifecycleNotifier*addObserver*
15 fun:*LifecycleNotifier*removeObserver*
16 fun:*toWebInputElement*
17 type:*base*MessageLoopForIO*
21 type:*ExecutionContext*
22 type:*WebInputElement*
23 type:*WebFormControlElement*
25 # Avoid identical layout cases for 86 different classes in InspectorTypeBuilder,
26 # all of which are guarded using COMPILER_ASSERT on the object size. Two more
27 # types are also blacklisted due to the template class (JSONArray <-> Array<T>).
29 src:*InspectorTypeBuilder.h*
33 #############################################################################
34 # Base class's constructor accesses a derived class's member.
36 fun:*DoublyLinkedListNode*
37 type:*content*WebUIExtensionData*
39 # RenderFrameObserverTracker<T>::RenderFrameObserverTracker()
40 fun:*content*RenderFrameObserverTracker*RenderFrame*
42 # RenderViewObserverTracker<T>::RenderViewObserverTracker()
43 fun:*content*RenderViewObserverTracker*RenderView*
45 #############################################################################
46 # Base class's destructor accesses a derived class.
48 fun:*DatabaseContext*contextDestroyed*
50 # FIXME: Cannot handle template function LifecycleObserver<>::setContext,
51 # so exclude source file for now.
52 src:*LifecycleObserver.h*
54 #############################################################################
55 # static_cast into itself in the constructor.
57 fun:*RefCountedGarbageCollected*makeKeepAlive*
58 fun:*ThreadSafeRefCountedGarbageCollected*makeKeepAlive*
60 #############################################################################
61 # Accessing data in destructors where the class has virtual inheritances.
63 type:*content*RenderWidgetHost*
65 # Match mangled name for X::~X().
66 fun:*content*RenderThreadImplD*
67 fun:*content*RenderViewHostImplD*
68 fun:*content*UtilityThreadImplD*
70 #############################################################################
71 # Using raw pointer values.
73 # A raw pointer value (16) is used to infer the field offset by
74 # GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET.
76 src:*/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
77 src:*/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc
78 src:*/third_party/protobuf/src/google/protobuf/descriptor.pb.cc
80 #############################################################################
82 # Ubsan vptr needs typeinfo on the target class, but it looks like typeinfo is
83 # not avaiable if the class is not exported. For now, simply blacklisted to
84 # avoid link errors; e.g., undefined reference to 'typeinfo for [CLASS_NAME]'.
86 # obj/ppapi/libppapi_proxy.a(obj/ppapi/proxy/ppapi_proxy.proxy_channel.o):../../ppapi/proxy/proxy_channel.cc:__unnamed_53: error: undefined reference to 'typeinfo for IPC::TestSink'
87 src:*/ppapi/proxy/proxy_channel.cc
89 # obj/chrome/libbrowser.a(obj/chrome/browser/net/browser.predictor.o):../../chrome/browser/net/predictor.cc:__unnamed_577: error: undefined reference to 'typeinfo for ProxyAdvisor'
90 src:*/chrome/browser/net/predictor.cc
92 # obj/third_party/pdfium/libfpdfapi.a(obj/third_party/pdfium/core/src/fpdfapi/fpdf_render/fpdfapi.fpdf_render_text.o):../../third_party/pdfium/core/src/fpdfapi/fpdf_render/:__unnamed_360: error: undefined reference to 'typeinfo for CPDF_InlineImages'
93 src:*/third_party/pdfium/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
95 # obj/third_party/libwebm/libwebm.a(obj/third_party/libwebm/source/libwebm.mkvmuxer.o)(.data.rel..L__unnamed_2+0x18): error: undefined reference to 'typeinfo for mkvparser::IMkvReader'
96 src:*/third_party/libwebm/source/mkvmuxer.cpp
98 #############################################################################
99 # UBSan seems to be emit false positives when virtual base classes are
100 # involved, see e.g. crbug.com/448102.
102 type:*v8*internal*OFStream*
104 #############################################################################
105 # UBsan is unable to handle static_cast<A*>(nullptr) and crashes on SIGSEGV.
108 # static_cast<StartPageService*> in StartPageServiceFactory::GetForProfile.
109 type:*StartPageService*
111 # Remove once function attribute level blacklisting is implemented.
112 # See crbug.com/476063.
113 fun:*forbidGCDuringConstruction*