Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

Changes between Version 86 and Version 87 of mmcco


Ignore:
Timestamp:
Dec 31, 2015, 10:23:46 PM (8 years ago)
Author:
mmcco
Comment:

update and simplify

Legend:

Unmodified
Added
Removed
Modified
  • mmcco

    v86 v87  
    162162=== The value of multiprocess design ===
    163163
    164 There isn't a simple, intuitive, widely-used, and easy-to-learn Mandatory Access Control (MAC) or similar framework yet. Options include FreeBSD's Capsicum, Linux's App^^Armor, and OpenBSD's newly released tame syscall. To further complicate things, these frameworks are generally baked into the kernel and are therefore platform-specific.
     164Privilege revocation of large, monolithic programs like Pidgin requires complicated access control frameworks. Options include FreeBSD's Capsicum and Linux's App^^Armor. These frameworks are baked into the kernel and are therefore platform-specific.
    165165
    166166[https://tails.boum.org/ Tails], an anonymity-focused operating system based on Tor and Debian, includes Pidgin and OTR by default. They've written an App^^Armor profile for Pidgin that's now included in the Debian/^^Ubuntu package `apparmor-profiles-extra`.
    167167
    168 All existing MAC frameworks are pretty cumbersome and have a slow learning curve. (tame is trying to buck this trend, but it's far too new and rarely used to be an option yet.) So, the best model is:
     168Because of these frameworks' complexity, the best model is:
    169169
    170170* program developers make their code multiprocess and refrain from using unnecessary privileges
    171 * packagers and OS/distro developers use this to write good MAC profiles
    172 
    173 Put more bluntly: it probably isn't worth developers' time to learn AppArmor et al. in order to write profiles. As long as MAC frameworks are big and complicated, the above method is far more efficient. Simple programs that use very few privileges (Pidgin definitely doesn't qualify) may be exceptions.
    174 
    175 Anecdotally, it'd be nice to start the convention of using a tag like `PRIVSEP` in code to help packagers find points of potential lockdown. Lacking these, searching for `fork()` and `exec()`-family functions with cscope or something similar is a good approach. Beyond that, running the program in a debugger and breaking on new process creation is educational, as is understanding its initialization and `main()` logic well.
     171* packagers and OS/distro developers write MAC profiles
     172
     173This method allows for more specialization and is therefore far more efficient.
     174
     175=== Code annotations ===
     176
     177Anecdotally, it'd be nice to start the convention of using a tag like `PRIVSEP` in code to help packagers find points of potential lockdown. Lacking these, locating `fork()` and `exec()`-family functions with cscope or something similar is a good approach. Running the program in a [http://www.sourceware.org/gdb/onlinedocs/gdb/Forks.html debugger] and breaking on new process creation is also educational, as is understanding its initialization and `main()` logic well.
    176178
    177179=== Breakages ===
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!