Sunday, June 14, 2009

Thoughts on Linux Secutiry Modules: General Security Support for the Linux Kernel

Authors: Chris Wright, Crispin Cowan, Stephen Smalley, James Morris, and Greg Kroah-Hartman

BibTeX:

@inproceedings{DBLP:conf/uss/WrightCSMK02,
author = {Chris Wright and
Crispin Cowan and
Stephen Smalley and
James Morris and
Greg Kroah-Hartman},
title = {Linux Security Modules: General Security Support for the
Linux Kernel},
booktitle = {USENIX Security Symposium},
year = {2002},
pages = {17-31},
ee = {http://www.usenix.org/publications/library/proceedings/sec02/wright.html},
crossref = {DBLP:conf/uss/2002},
bibsource = {DBLP, http://dblp.uni-trier.de}
}
@proceedings{DBLP:conf/uss/2002,
editor = {Dan Boneh},
title = {Proceedings of the 11th USENIX Security Symposium, San Francisco,
CA, USA, August 5-9, 2002},
booktitle = {USENIX Security Symposium},
publisher = {USENIX},
year = {2002},
isbn = {1-931971-00-5},
bibsource = {DBLP, http://dblp.uni-trier.de}
}

Summary:

The paper describes the motivation, design, and some of the implementation of the Linux Security Modules framework. The LSM framework allows many security models to be implemented as loadable Linux kernel modules. Rather than only interposing on system calls, LSM provides hooks for modules asking whether an access to an internal kernel object should be granted or denied. Almost always, the LSM hooks are restrictive rather than authoritative. That is, they allow a module to deny a request that the Linux DAC mechanism would have allowed rather than override a denial.

To support POSIX.1e capabilities, LSM provides some minimal support for permissive hooks that do override a denial. LSM is limited to supporting the core access control functionalities needed by existing Linux security projects, rather than adding auditing and virtualization.

LSM add opaque void * security fields in various internal kernel objects that the module can use to label them. It also allows module stacking where the primary module has the final say on whether to allow or deny an access request.

To implement LSM, the kernel was modified in 5 main ways:
  1. Opaque Security Fields were added to objects, and hooks were defined to instantiate, free, and update them. Note that special handling is required for object the already exist before the security module is loaded.
  2. Security Function Hooks were added in key accesses in the kernel. These are implemented by the module.
  3. A security System Call was added to allow security aware userspace applications to interact with the security module. The system call implementation is up to the security module.
  4. Registering security modules requires a special API to activate the hooks. Other were added so that modules can register themselves with others and stack.
  5. Modify capabilities to reduce the capable call to a wrapper for a LSM hook. Moving the capabilities bit vector from the task_struct to the opaque security field and modifying the system call interface are the only steps left in making capabilities completely standalone.


Additional hooks were provided
  1. for working with tasks (nice, kill, setuid)
  2. for program loading and controlling inheritance of state across program executions (such as file descriptors)
  3. for IPC
  4. for file ops (read, write, sockets)
  5. for network ops (devices, syscalls, sk_buffs)
  6. for module operations (create, register, delete)
  7. for sytem operations (hostname, accessing I/O ports, process accounting)
They performed some evaluation (LMBench and kernel compilation) and surprisingly, kernels patched with LSM seem to perform slightly better than unpatched ones. The authors claim this is experimental error and only consider that LSM has an unnoticeable overhead.

LSM provides no persistent storage of security attributes to files since that requires extended attributes, a complex issue. They decided not to completely modularize the Linux DAC security checks since that would be too invasive.

The Good:
This is really cool. It is now very easy to implement new security models. While it's true that notall models are possible, it is still a great leap forward. The interface seems simple and workable and they have interposed on the major kernel functions.

The Bad:
Unfortunately, the paper makes the implementation look a little arbitrary. There does not seem to be a systematic approach into what needs to be looked at, how many hooks there are, and where they should be. They already mentioned that access control has yet to be completely modularized to provide authoritative hooks. LSM only provides access control, unfortunately there is no interposition except on access request. It is not clear whether there has been any interposition on context switching or on cache control. No mention of interposing on memory or CPU resource allocations either.

Thoughts on A Scalable, Commodity Center Network Architecture

Authors: Mohammad Al-Fares, Alexander Loukissas, and Amin Vahdat

SIGCOMM 2009

Summary:
The authors make the case that large data-center networks are expensive and that cost increases non-linearly with size. Current design techniques do not fully utilize fan-out and multipath, and when they do it's either at the cost of compatibility (Myrinet != Ethernet/Infiniband non-TCP/IP /ECMP with randomization reorders packets) or complexity (ECMP with region splitting needs 600k TCAM entries for 25k net).

The authors demonstrate how to design a fat-tree data-center network using "commodity" Ethernet/IP switches and routers. They give switches IP addresses based on their location in the fat tree, making it easier to do routing and select paths. They presented three methods of packet diffusion on the upward path in the fat-tree:
  1. Static two-level table routing based on host ID: simple, but performs the worst, non-dynamic, needs extra work when a link dies to send updates everywhere. Host IDs may not provide sufficient entropy depending on the communication pattern (hence the bad performance). Tables (TCAMs), however, only need k<=48 entries, which is remarkably cheap, and does not in fact need a discrete component.
  2. Flow Classification: switches monitor flow sizes and periodically reassign a few flows to balance usage across ports. Only local optimization and does not avoid hotspots in the core. Performs better than
  3. Central Flow Scheduler: Edge switches monitor flow sizes and notify a central scheduler when a flow goes above a certain threshold. The scheduler then reassigns the flow's path to the minimally loaded links.
In all three cases change is needed to the switches in order to support the designs. First, something like OpenFlow is needed to do central managing and routing because they did not come up with a distributed routing protocol, and it helps implement (3) above. Second, a change in the lookup mechanism is needed to support the two-level tables used.

Using some back-of-the-envelope calcuations, traditional networks use almost twice the power and dissipate almost twice the heat. This is because they use switches with 10GigE uplinks and 10 GigE switches, and a 10GigE switch uses approximately double the power per Gbps and disspates 3x the heat of a 1GigE switch. The calculation was done for the largest networks they support (~27k hosts).

They implemented the design on NetFPGA but gave no performance numbers. They also incorrectly assumed that because it was easy to modify the NetFPGA, it would be easy to modify other switches.

They also implemented the three designs above in software using Click, and measured the throughput. In all cases, the hierarchical traditional design did worst, then the two-level table, then flow classification, while flow scheduling did best.

The authors also investigated a packagin solution, proposing to put all the pod switches in a central rack and have all pod hosts in other racks connect to it. Then, core switches are equally divided among the pods, and the pods are laid out in a grid. This bundles up the cables that are going between pods and the cables between racks. The switch rack itself can have built in wiring to simplify cabling inside the pod switch rack.

The Good:
This is work that has needed to be done for a while now. It is surprising no one has done this research before given that most of the algorithms used are simple and intuitive. They do not give enough credit to centralization for their work, probably so they don't upset some people. It is noteworthy that all of the work would have been much more complex if they did not use centralization (if not impossible). That is why it is a little unfair to compare the work with OSPF2-ECMP which is fully distributed.

The work is feasible, and seems not too difficult to implement or build. On the whole I really like the paper and work.

The Bad:
Even though they claim they use "commodity" switches, the switches needed are not "commodity". Depending on the algorithms used, they either need two-level table support (possible hardware change though not necessarily) or OpenFlow-support (software mostly). They call them "commodity" because they do not use aggregated uplinks (such as 10GigE ports or switches). If the hardware modification is needed, it is not clear it can happen. OpenFlow, on the other hand, is quite likely to happen and is already on the way. Given these new needs and changes from the fully-distributed hierarchical design, they should have mentioned more openly how their infrastructure differs from traditional infrastructure. They cannot really go buy a bunch of switches from Fry's and use them.

The calculations for power/heat and costs are all back-of-envelope calculations. I am also uncertain of the fairness in comparisons. The higher-end more expensive switches and more power-consuming switches are more robust and provide much more functionality and features than the lower-end switches they use. A good question is, does the network they build with cheap switches offer all the same features an admin expects from a traditional network?

While difficult to do, it would have been nice to see a concrete example that includes cabling, packaging, and operation costs. In their throughput calculations, they use artificial traffic patterns that do not take into account the bursty nature of traffic. Their algorithms also assume "Internet-like" traffic with heavy tails. It would be interesting to see how their algorithms fair with real data center traces. It is surprising they could not get any. I expect a data-center's traffic burstiness to significantly change their results.

It is also unfortunate that they have not tried to implement their solutions on any real hardware. So it is not clear how easy it is to modify currently available infrastructure. It doesn't seem that the whole DC network needs to be overhauled.

While it is a point they made in the paper, the wiring complexity seems to be quite horrible, and I am not sure the solution they propose fixes the problem. Perhaps one needs to look at the problem a higher level up and consider building chassis that house pods...

Monday, May 18, 2009

Thoughts on Distributed Firewalls

Author: Steven M. Bellovin

BibTex:

@ARTICLE{Bellovin99distributedfirewalls,
author = {Steven M. Bellovin},
title = {Distributed Firewalls},
journal = {IEEE Communications Magazine},
year = {1999},
volume = {32},
pages = {50--57}
}

also: S. M. Bellovin. Distributed Firewalls. ;login: magazine, special issue on security, November 1999.

Summary:

Centralize policy, distribute enforcement. The end-host knows exactly what is going on in the machine and can make more informed decisions. Distributed enforcement no longer depends on the topology of a network.

Use IPSEC certs to authenticate hosts. Use hybrid firewalls (both distributed and traditional) with app proxies for complex app rules.

Claim that:
  • Can do application level filtering by distributing application rules (e.g. no Javascript in browsers)
  • Can protect machines in internal network from each other
  • Can understand app level semantics
  • Can protect mobile nodes
  • Can manage changes such as updates by distributing new certs and lowering privileges for old certs
Threat comparison between traditional and distributed:
  • Service exposure and port scanning: Comparable
  • App level proxies: conventional in most cases wins
  • DoS: Distributed wins
  • IDS: conventional easier, though distributed can gather more data.
  • Insider attacks: comparable
The claim the author believes is the most important is freedom from topology restrictions.

The Good:
Yes it is definitely a great idea to centralize policy and make sure that it is consistent across multiple security mechanisms. It is also true that the end-host knows more about a connection and thus can enforce more things. Distributed firewalls also free the security policy from relying on topology.

The Bad:
  • Enforcement on the end-host is a bad idea because it is easy to subvert the system (as was noted in the paper). This would make the admin's policies useless.
  • The author mentions application level enforcement, but that means that the firewall must somehow know what each application is doing and for example realizae that some html has javascript or the like. That is a very difficult thing to do in a generic way. How would one keep track of all the new applications that come up? Indeed, the author mentions this is a problem just before the conclusion.
  • The argument that conventional firewalls are more susceptible to DoS attacks is not quite correct. Firewall boxes are usually much more powerful than end-hosts, and so end-hosts are the ones that are more susceptible to DoS attacks. In addition, a DoS attack against an enterprise that does not have a conventional firewall at the point where it connects to the Internet can suffer from a DoS attack that extends deeper into the network such as NFS DoS.
The paper was well-written, though I do not feel it fixes much. Enforcement has to be impossible to circumvent so that an administrator always has the final word. ident++ deals with this issue exactly. In addition, ident++ moves the enforcement away from the end-host so it doesn't get DoS'ed. It also asks both end points of a connection whether the connection is allowed, making sure no bandwidth is wasted anywhere and no host misbehaves.

Thursday, May 14, 2009

Thoughts on Trends in Mobile and Wireless Talk

Speaker: Dr. Nambi Seshadri, CTO Mobile and Wireless at Broadcom

Date: 5/13/2009

Summary:

Dr. Seshadri pointed out the trends and technologies that shaped the first three generations of wireless, then he discussed the trends that will shape the fourth.

  1. 802.11 FH/DS-SS, Analog Voice

    • Frequency Reuse

    • Handoffs

    • cell splitting



  2. 802.11/a/b/g, bluetooth, Digital Voice, SMS, GPRS

    • Digital communication over fading channels/Viterbi Algorithm

    • Digital speech compression (CELP)

    • VLSI



  3. 100-600 Mbps WLAN, 480-1000Mbps WPAN, 802.11n MIMO, MMS, EDGE/WCDMA, EVDO/HSDPA

    • CMOS RF

    • Java/browsers/email/sync

    • camera/mp3

    • open OS (Symbian, Windows mobile, LiMo, Android)



  4. >1Gbps WLAN/WPAN, Broadband Multimedia/Video

    • Ubiquitous broadband

    • Convergence on "Open" platform

    • Industry transformation: OS free (Android/Symbian), Make money from Content/service/apps/advertising
Then he talked about technologies shaping M 4.0 (mobile 4th gen) and he mentioned computing power, sensors, positioning, open OS, security, high BW connectivity, alternative power sources (inductive power), health monitoring...

Then he talked a while about Ubiquitous positioning using Assisted GPS: Using GNSS satellites, Wifi hotspots, CDMA towers, NMR/MRL measuring Rx power, Cell ID, Digital TV towers...

Multimodal (multiple wireless modes) chips are driving cost down.

In all, it was an OK summary, nothing that sparks fantasies or that has any depth.

Wednesday, May 13, 2009

Thoughts on The Collective: A Cache-Based System Management Architecture

Authors: Ramesh Chandra, Nickolai Zeldovich, Constantine Sapuntzakis, Monica S. Lam

BibTeX:

@INPROCEEDINGS{thecollective,
author = {Ramesh Chandra and Nickolai Zeldovich and Constantine Sapuntzakis and Monica S. Lam},
title = {The Collective: A Cache-Based System Management Architecture},
booktitle = {In Proc. 2nd Symposium on Networked Systems Design & Implementation (NSDI},
year = {2005},
pages = {259--272}
}

Summary:

The Collective is a system that allows users to load virtual appliances from a cloud, cache them locally, and run them. There are two types of data: User and Appliance. User data is mutable by the user and is stored and backed up online as the user modifies it (this include things like docs and profiles). Appliance data is immutable (except by an admin) and a pristine unmodified copy is re-run every time a VM is started with that appliance.

The Collective simplifies deployment and management. All machines run Virtual Appliance Transciever software (VAT) that contains the VMM and provides an interface for the user to login, select an appliance, and access his data. The VAT self-updates without requiring any intervention from the user.

Appliances can be updated by an admin and on the next reboot, a user would use the updated image. Updates are tracked by versioning using a simple numbering and directory hierarchy scheme. When downloaded, they are stored using Copy-on-Write (COW) disk caches for large blocks and use replication for small meta-data. It is possible to cache full appliance images so that a user can work offline disconnected from the appliance repo.

The evaluation section is very well constructed and nicely sums up how well the system works. They found prefetching works, and using traces to decide what to prefetch can be a significant boon to performance. Interactive and I/O intensive work is as expected: bad. Maintenance/upgrading/deploying is easy and painless.

The Good:
I've been thinking about a system like this for a while, and they've taken it to completion and even started a company with it (Mocha5). I think the architecture is sound but is limited by the technology (bandwidth, virtualization, ...). I enjoyed reading the experience section because it was an evaluation of whether the system met its goals. I will definitely read their eval and experience section again before writing my next paper.

The Bad:
Unfortunately, I/O bound and interactive ops are horrible. It's not clear if much can be done to remedy the situation, but since the Collective will be used for interactive apps and to manage users' desktops, it seems that the Collective is unusable. I would really like to manage my machines this way, but I'm already sick of Windows running so slowly in a VM.

They have not mentioned much about security. They only said they use SSH to transfer data and perform authentication. I guess this was not a concern and they assumed that only important thing was to make sure that the appliance itself did not get compromised. I would argue that the important piece is for the user data not to be compromised. Maybe the assumption they run with is that if a VM is secured and patched then the user data will be safe.

Monday, May 11, 2009

Thoughts on Practical Declarative Network Management

Authors: Timothy Hinrichs, Natasha Gude, Martin Casado, John Mitchell, Scott Shenker

Published in: Workshop on Research in Enterprise Networks (WREN) 2009

Summary:
The authors designed, implemented, and tested a language for declarative network policies --- Flow Management Language (FML). The language has no ordering and is declarative. Conflicts in rules can arise and are handled by prioritizing keywords (e.g. deny has higher priority over allow). Because the language has no ordering the authors claim it is easier to write and reason about and is can accommodate multiple authors more easily. Application developers can have control over flows and can write rules themselves.

They implemented the FML engine over Nox and deployed it on two campuses. The implementation can process rules in linear time and can handle heavy loads. The implementation was done by using trees in order to evaluate rules. The deployment seems to be working, and they had the ability to introduce new keywords (HttpRedirect) into the language to handle complex cases.

The Good:
The paper makes it clear that FML is a flexible language that can be used to declare network policies nicely. But not only is it flexible, concise, and based on principals, it can be evaluated in linear time. The implementation and deployment provides good evaluation. The tree implementation for implementation is a very cute idea. I think I will be using it for my stuff :) I liked the fact that new keywords can be added, but is it easy to do?

The Bad:
The authors argue that ordering is a bad idea. Yet, they end up enforcing some form of ordering by making policies cascade. OK, so it's not ordered within a single cascade, but I'm not sure you would write rules without cascades. They did not make the case for lack of ordering well. I think it is really really difficult to reason about flows in the case of conflicts. I do not see how the combination of conflicts + keyword prioritization + cascades is simpler than a total ordering on all statements. The argument about making it easier for multiple authors does not really hold water because it seems that authors would have priority, and you don't want conflicts anywhere. In fact, I don't see how multiple authors can operate easily in FML, even with cascades!

Unfortunately, I don't see how application developers (or do they mean Nox applications?) can control their own flows. Is their an API? I thought FML was pre-compiled, how do users add their own stuff there?

The Ugly:
I really did not like the non-ordering, cascading, and keyword prioritization stuff. It seemed to make things much more complex. The fact that conflicts are allowed negates a whole bunch of things they had said about making it clearer to reason about things. I don't see its necessity, or maybe there is some necessity (such as to make it easier for implementation) but I don't recall it was mentioned in the paper.

Wednesday, May 6, 2009

Thoughts on SCADS: Scale-Independent Storage for Social Computing Applications

Authors: Michael Armburst, Armando Fox, David Patterson, Nick Lanham, Beth Trushkowsky, Jesse Trutna, Haruki Oh

BibTeX:
@proceedings { citation185,
title = {{SCADS}: Scale-independent storage for social computing applications},
year = {2009},
month = {01/2009},
booktitle={Conference on Innovative Data Systems Research {(CIDR)}}
URL = {http://www-db.cs.wisc.edu/cidr/cidr2009/Paper_86.pdf},
author = {Michael Armbrust and Armando Fox and David Patterson and Nick Lanham and Haruki Oh and Beth Trushkowsky and Jesse Trutna}
}

Summary:
The authors are working on a framework that allows developers to scale up as well as scale down easily. There are three main parts to this: A query language that does not compromise performance with scale, a declarative policy that allows developers to specify performance levels that the framework should achieve, and machine learning algorithms to rapidly scale up and down. One of the main points is that consistency can be traded for performance.

The Good:
The system looks cool. It would be nice to have the performance of memcached with a flexible query language. It's nice to throw all the load on some machine learning algorithm to scale up and down.

The Bad:
System is still preliminary.

The Ugly:

This seems a huge amount of work. I wonder if it will ever work.