Information Flow Control for Event Handling and the DOM in Web Browsers Vineet Rajani Abhishek Bichhawat Deepak Garg Christian Hammer MPI-SWS, Germany Saarland University, Germany MPI-SWS, Germany Saarland University, Germany
[email protected] [email protected] [email protected] [email protected] Abstract—Web browsers routinely handle private informa- party code to confidential resources. Although sometimes tion. Owing to a lax security model, browsers and JavaScript provably secure [11], these systems restrict third-party code in particular, are easy targets for leaking sensitive data. Prior to subsets of HTML and JS to enable analysis. work has extensively studied information flow control (IFC) as a mechanism for securing browsers. However, two central More generally, all data protection mechanisms discussed aspects of web browsers — the Document Object Model (DOM) above implement some form of one-time access control and the event handling mechanism — have so far evaded thor- on data available to third-party code. As such, they are ough scrutiny in the context of IFC. This paper advances the completely ineffective when the third-party code legitimately state-of-the-art in this regard. Based on standard specifications needs confidential data to provide functionality, but must and the code of an actual browser engine, we build formal models of both the DOM (up to Level 3) and the event handling be prevented from disclosing it in unexpected ways. In- loop of a typical browser, enhance the models with fine-grained formation flow control (IFC) within the web browser is an taints and checks for IFC, prove our enhancements sound and obvious, holistic method to solve this problem.