Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Capability-based security

From Wikipedia, the free encyclopedia
Computer safety concept

Capability-based security is a concept in the design ofsecure computing systems, one of the existingsecurity models. Acapability (known in some systems as akey) is a communicable, unforgeabletoken of authority. It refers to a value thatreferences anobject along with an associated set ofaccess rights. Auserprogram on acapability-based operating system must use a capability to access an object. Capability-based security refers to the principle of designing user programs such that they directly share capabilities with each other according to theprinciple of least privilege, and to the operating system infrastructure necessary to make such transactions efficient and secure. Capability-based security is to be contrasted with an approach that usestraditional UNIX permissions andaccess control lists.

Although most operating systems implement a facility which resembles capabilities, they typically do not provide enough support to allow for the exchange of capabilities among possibly mutually untrusting entities to be the primary means of granting and distributing access rights throughout the system. A capability-based system, in contrast, is designed with that goal in mind.

Introduction

[edit]

Capabilities achieve their objective of improving system security by being used in place of forgeablereferences. A forgeable reference (for example, apath name) identifies an object, but does not specify which access rights are appropriate for that object and the user program which holds that reference. Consequently, any attempt to access the referenced object must be validated by the operating system, based on theambient authority of the requesting program, typically via the use of anaccess-control list (ACL). Instead, in a system with capabilities, the mere fact that a user program possesses that capability entitles it to use the referenced object in accordance with the rights that are specified by that capability. In theory, a system with capabilities removes the need for any access control list or similar mechanism by giving all entities all and only the capabilities they will actually need.

A capability is typically implemented as aprivilegeddata structure that consists of a section that specifies access rights, and a section that uniquely identifies the object to be accessed. The user does not access the data structure or object directly, but instead via ahandle. In practice, it is used much like afile descriptor in a traditional operating system (a traditional handle), but to access every object on the system. Capabilities are typically stored by the operating system in a list, with some mechanism in place to prevent the program from directly modifying the contents of the capability (so as to forge access rights or change the object it points to). Some systems have also been based oncapability-based addressing (hardware support for capabilities), such asPlessey System 250.

Programs possessing capabilities can perform functions on them, such as passing them on to other programs, converting them to a less-privileged version, or deleting them. The operating system must ensure that only specific operations can occur to the capabilities in the system, in order to maintain the integrity of the security policy.

Capabilities as discussed in this article should not be confused with Portable Operating System Interface (POSIX) 1e/2c "Capabilities". The latter are coarse-grained privileges that cannot be transferred between processes.

Examples

[edit]

A capability is defined to be a protectedobject reference which, by virtue of its possession by a user process, grants that process the capability (hence the name) to interact with an object in certain ways. Those ways might include reading data associated with an object, modifying the object, executing the data in the object as a process, and other conceivable access rights. The capability logically consists of a reference that uniquely identifies a particular object and a set of one or more of these rights.

Suppose that, in a user process's memory space, there exists the following string:

/etc/passwd

Although this identifies a unique object on the system, it does not specify access rights and hence is not a capability. Suppose there is instead the following pair of values:

/etc/passwdO_RDWR

This pair identifies an object along with a set of access rights. The pair, however, is still not a capability because the user process'spossession of these values says nothing about whether that access would actually be legitimate.

Now suppose that the user program successfully executes the following statement:

intfd=open("/etc/passwd",O_RDWR);

The variablefd now contains the index of a file descriptor in the process's file descriptor table. This file descriptoris a capability. Its existence in the process's file descriptor table is sufficient to show that the process does indeed have legitimate access to the object. A key feature of this arrangement is that the file descriptor table is inkernel memory and cannot be directly manipulated by the user program.

Sharing between processes

[edit]

In traditional operating systems, programs often communicate with each other and with storage using references like those in the first two examples. Path names are often passed as command-line parameters, sent via sockets, and stored on disk. These references are not capabilities, and must be validated before they can be used. In these systems, a central question is "on whoseauthority is a given reference to be evaluated?" This becomes a critical issue especially for processes which must act on behalf of two different authority-bearing entities. They become susceptible to a programming error known as theconfused deputy problem, very frequently resulting in asecurity hole.

In a capability-based system, the capabilities themselves are passed between processes and storage using a mechanism that is known by the operating system to maintain the integrity of those capabilities.

One novel approach to solving this problem involves the use of anorthogonally persistent operating system. In such a system, there is no need for entities to be discarded and their capabilities be invalidated, and hence require an ACL-like mechanism to restore those capabilities at a later time. The operating system maintains the integrity and security of the capabilities contained within all storage, both volatile and nonvolatile, at all times; in part by performing allserialization tasks by itself, rather than requiring user programs to do so, as is the case in most operating systems. Because user programs are relieved of this responsibility, there is no need to trust them to reproduce only legal capabilities, nor to validate requests for access using anaccess control mechanism. An example implementation is theFlex machine from the early 1980s.

POSIX capabilities

[edit]

Portable Operating System Interface (POSIX) draft 1003.1e specifies a concept of permissions called "capabilities". However, POSIX capabilities differ from capabilities in this article. A POSIX capability is not associated with any object; a process having CAP_NET_BIND_SERVICE capability can listen on any TCP port under 1024. This system is found in Linux.[1]

In contrast,Capsicum Unix hybridizes a true capability-system model with a Unix design and POSIX API. Capsicum capabilities are a refined form of file descriptor, a delegable right between processes and additional object types beyond classic POSIX, such as processes, can be referenced via capabilities. In Capsicum capability mode, processes are unable to utilize global namespaces (such as the filesystem namespace) to look up objects, and must instead inherit or be delegated them. This system is found natively in FreeBSD, but patches are available to other systems.[2]

Implementations

[edit]

Notable research and commercial systems employing capability-based security include the following:

Discontinued

[edit]

References

[edit]
  1. ^capabilities(7) – Linux Programmer'sManual – Overview, Conventions and Miscellanea
  2. ^capsicum(4) – FreeBSD Kernel InterfacesManual
  3. ^"Capsicum(4)".
  4. ^Capsicum: practical capabilities for UNIX. Retrieved 9 July 2024
  5. ^"Genode OS: a breath of fresh air in operating system and software security".Rudd-O.com. Retrieved2023-12-21.
  6. ^"Google's Fuchsia operating system runs on virtually anything".Engadget. 2016-08-14. Retrieved2023-12-21.
  7. ^Děcký, Martin."Microkernel-based and Capability-based Operating Systems"(PDF).D3S. Retrieved23 December 2023.
  8. ^"docs/en/application-dev/security/accesstoken-overview.md at master · openharmony/docs".GitHub. Retrieved2024-05-04.
  9. ^DARKNAVY (2024-06-11)."AVSS Report: System Security Adversarial Capability Preliminary Evaluation of iOS, Android, and HarmonyOS - Kernel".DARKNAVY. Retrieved2024-07-04.
  10. ^Dziuba, Ted."Russian rides Phantom to OS immortality".The Register. Retrieved31 December 2023.

Further reading

[edit]

POSIX "capabilities" in Linux:

External links

[edit]
Concepts
Operating systems,
kernels
Programming languages
File systems
Specialised hardware
Retrieved from "https://en.wikipedia.org/w/index.php?title=Capability-based_security&oldid=1295300962"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp