Incident: Bug in OS X Lion Quarantine Feature Prevents Execution of User Scripts

Published Date: 2012-02-10

Postmortem Analysis
Timeline 1. The software failure incident happened in February 2012.
System The system that failed in the software failure incident described in the article is: 1. OS X Lion (latest version) - The bug causing the quarantine flag to be attached to existing files on the system primarily affected Apple's sandboxed applications like TextEdit and Preview in OS X Lion [10174].
Responsible Organization 1. The software failure incident in the article was caused by a bug in the latest version of OS X Lion, specifically affecting Apple's sandboxed applications like TextEdit and Preview [10174].
Impacted Organization 1. Users who create shell scripts and use TextEdit for editing them were impacted by the software failure incident [10174].
Software Causes 1. The software cause of the failure incident was a bug in the latest version of OS X Lion where the quarantine flag was erroneously attached to existing files on the system, preventing some code such as user scripts from being executed [10174].
Non-software Causes 1. The issue was related to alterations in the sandbox rule configuration in the OS, specifically affecting Apple's sandboxed applications like TextEdit and Preview [10174].
Impacts 1. The software failure incident caused existing files on the system to have the quarantine flag attached to them, preventing some code such as user scripts from being executed, resulting in an "Operation not permitted" error in the Terminal [10174].
Preventions 1. Ensuring thorough testing of the OS X Lion version before release to catch the bug related to the quarantine flag attachment to existing files [10174]. 2. Implementing stricter quality control measures during the development process to detect and address issues like the one causing the quarantine flag problem [10174]. 3. Conducting regular audits or reviews of the sandbox rule configuration in the OS to prevent unintended consequences like the quarantine flag issue [10174].
Fixes 1. Removing the quarantine attributes from individual files or parent folders containing scripts by using the Terminal command "xattr -d com.apple.quarantine" or "xattr -d -r com.apple.quarantine" [10174]. 2. Using a text editor that is not sandboxed, such as TextWrangler, or a command-line text editor like vi, pico/nano, or emacs [10174]. 3. Disabling quarantining altogether by running the command "defaults write com.apple.LaunchServices LSQuarantine -bool NO" in the Terminal and then rebooting the system [10174].
References 1. The article gathers information about the software failure incident from the author's investigation and analysis of the problem within the latest version of OS X Lion [10174].

Software Taxonomy of Faults

Category Option Rationale
Recurring one_organization (a) The software failure incident related to the quarantine bug in OS X Lion appears to have happened again within the same organization, Apple. The bug causing the quarantine flag to be attached to existing files on the system, preventing some code from being executed, was specifically observed in Apple's sandboxed applications such as TextEdit and Preview. This suggests that the issue may be related to alterations in the sandbox rule configuration in the OS, affecting Apple's own applications [10174].
Phase (Design/Operation) design (a) The software failure incident described in the article is related to the design phase. The issue is caused by a bug in the latest version of OS X Lion where the quarantine flag is incorrectly attached to existing files on the system, preventing some code from being executed. This bug is specifically affecting Apple's sandboxed applications like TextEdit and Preview, indicating that alterations to the sandbox rule configuration in the OS may be the root cause of the problem. The article discusses how sandboxing, a method of restricting a program's access to system resources, may have been impacted by adjustments to entitlements defined in Apple's frameworks, leading to the quarantine flag issue [10174]. (b) The software failure incident is not related to the operation phase or misuse of the system. The issue is not caused by user error or misuse but rather by a bug in the system that affects the functionality of certain applications due to the incorrect attachment of the quarantine flag to files on the system [10174].
Boundary (Internal/External) within_system The software failure incident described in the article [10174] is primarily within the system. The issue is related to a bug in the latest version of OS X Lion where the quarantine flag is incorrectly attached to existing files on the system, particularly affecting Apple's sandboxed applications like TextEdit and Preview. This bug prevents certain code, such as user scripts, from being executed, even if edits are made but not saved. The problem seems to be associated with alterations to the sandbox rule configuration in the OS, specifically affecting sandboxed applications. The article suggests that the issue lies within the system's Autosave features and the adjustments made by Apple to the sandbox rule configuration, leading to the quarantine flag being erroneously applied to edited documents from sandboxed applications.
Nature (Human/Non-human) non-human_actions (a) The software failure incident in Article 10174 occurred due to non-human actions. Specifically, the issue was related to a bug in the latest version of OS X Lion where the quarantine flag was erroneously attached to existing files on the system, preventing certain code, such as user scripts, from being executed. This bug was not caused by human actions but rather by alterations to the sandbox rule configuration in the OS, affecting sandboxed applications like TextEdit and Preview [10174].
Dimension (Hardware/Software) software (a) The software failure incident in Article 10174 is related to software. The issue described in the article is a bug in the latest version of OS X Lion where the quarantine flag is incorrectly attached to existing files on the system, preventing certain code, such as user scripts, from being executed. This bug is specifically affecting Apple's sandboxed applications like TextEdit and Preview, indicating that the problem lies within the software itself rather than hardware [10174].
Objective (Malicious/Non-malicious) non-malicious (a) The software failure incident described in the article is non-malicious. The issue is related to a bug in the latest version of OS X Lion where the quarantine flag is incorrectly attached to existing files on the system, particularly affecting sandboxed applications like TextEdit and Preview. This bug prevents certain code, such as user scripts, from being executed, leading to errors like "Operation not permitted" in the Terminal. The problem seems to stem from alterations to the sandbox rule configuration in the OS, causing edited documents from sandboxed applications to be quarantined [10174].
Intent (Poor/Accidental Decisions) accidental_decisions The software failure incident described in the article [10174] appears to be related to accidental_decisions. The issue with the quarantine flag being erroneously attached to existing files on the system, preventing certain code from being executed, seems to stem from unintended consequences rather than poor decisions. The bug causing this trouble is likely a result of mistakes or unintended changes in the OS X Lion system, particularly in the alterations to the sandbox rule configuration, leading to the unintended quarantine of files and scripts.
Capability (Incompetence/Accidental) accidental (a) The software failure incident in Article 10174 is not related to development incompetence. The issue described in the article is a bug in the latest version of OS X Lion where the quarantine flag is incorrectly attached to existing files on the system, preventing some code from being executed. This bug seems to be a result of alterations to the sandbox rule configuration in the OS, specifically affecting Apple's sandboxed applications like TextEdit and Preview. The problem is not attributed to development incompetence but rather to a technical issue within the software system. (b) The software failure incident in Article 10174 is accidental in nature. The bug causing the quarantine flag to be incorrectly attached to existing files on the system, thereby preventing some code from being executed, appears to be unintentional. The article does not suggest that this issue was introduced deliberately or due to malicious intent. It is described as a bug in the latest version of OS X Lion, affecting certain sandboxed applications, and not as a result of intentional actions or decisions.
Duration temporary The software failure incident described in the article is temporary. The issue is related to a bug in the latest version of OS X Lion where the quarantine flag is incorrectly attached to existing files on the system, preventing some code from being executed. This bug affects only Apple's sandboxed applications like TextEdit and Preview, suggesting the problem lies with alterations to the sandbox rule configuration in the OS [10174]. The incident is not permanent as it is specific to certain circumstances and applications, rather than being a widespread issue affecting all programs on the system.
Behaviour value, other (a) crash: The software failure incident described in the article does not involve a crash where the system loses state and does not perform any of its intended functions. The issue is related to the quarantine flag being incorrectly attached to existing files, preventing certain code from being executed, rather than a complete system crash [10174]. (b) omission: The software failure incident does not involve the system omitting to perform its intended functions at an instance(s). Instead, the issue lies in the incorrect attachment of the quarantine flag to files, affecting the execution of certain code [10174]. (c) timing: The software failure incident is not related to the system performing its intended functions correctly but too late or too early. The issue with the quarantine flag affecting the execution of code is not about timing but rather about the incorrect attachment of the flag to files [10174]. (d) value: The software failure incident is related to the system performing its intended functions incorrectly. Specifically, the issue with the quarantine flag being erroneously attached to files is causing certain code to not execute properly, leading to an "Operation not permitted" error in the Terminal [10174]. (e) byzantine: The software failure incident does not exhibit a byzantine behavior where the system behaves erroneously with inconsistent responses and interactions. The issue with the quarantine flag affecting the execution of code is consistent and reproducible, indicating a specific problem with the system's behavior in handling the quarantine attribute [10174]. (f) other: The software failure incident involves a specific behavior where the quarantine flag is incorrectly attached to existing files, particularly impacting the execution of code such as user scripts. This behavior is not a crash, omission, timing issue, byzantine behavior, or a value issue but rather a unique problem related to the handling of the quarantine attribute in the system [10174].

IoT System Layer

Layer Option Rationale
Perception None None
Communication None None
Application None None

Other Details

Category Option Rationale
Consequence delay (a) unknown (b) unknown (c) unknown (d) The software failure incident described in the article did not result in any direct harm to people or property. It mainly caused inconvenience and prevented some code, such as user scripts, from being executed due to a bug in the OS X Lion version. Users who relied on TextEdit for editing scripts faced issues as the quarantine flag was incorrectly attached to existing files, impacting their ability to run scripts [10174]. (e) The software failure incident caused a delay for users who needed to edit and run scripts using TextEdit. Due to the bug in OS X Lion, the quarantine flag was incorrectly applied to existing files, preventing the execution of scripts and resulting in an "Operation not permitted" error in the Terminal. Users had to find workarounds such as removing the quarantine attributes or using other text editors to address the issue [10174]. (f) unknown (g) The software failure incident did not lead to any significant real observed consequences. While it caused inconvenience for users who edited and ran scripts using TextEdit, there were no reports of any severe impacts on individuals or entities [10174]. (h) unknown (i) unknown
Domain information (a) The software failure incident discussed in the article is related to the information industry. The issue pertains to a bug in the latest version of OS X Lion that causes the quarantine flag to be attached to existing files on the system, preventing some code such as user scripts from being executed [10174]. This bug affects Apple's sandboxed applications like TextEdit and Preview, indicating that alterations to the sandbox rule configuration in the OS are causing the problem [10174]. TextEdit, being the editor that Apple ships with OS X, is commonly used to make quick edits to scripts and other executable files on the system, leading to the impact of this bug on users who rely on such functionality [10174].

Sources

Back to List