Null pointer dereference due to TOCTTOU bug in mrb_time_initialize

Disclosed: 2017-01-15 19:56:05 By raydot To shopify-scripts
High
Vulnerability Details
mrb_time_initialize sets the data pointer to NULL before parsing function arguments. Parsing function arguments can call out to ruby code to call methods to do type coercion. If the type coercion method tries to access the time object it will dereference a NULL pointer. The following snippet results in a native crash under mruby-engine: ``` $x = Time.new class Tmp def to_i $x.mday end end $x.initialize Tmp.new ``` Attached is a patch to mruby to fix this issue.
Actions
View on HackerOne
Report Stats
  • Report ID: 182274
  • State: Closed
  • Substate: resolved
  • Upvotes: 15
Share this report