close
Skip to content

apparmor: prohibit /sys/firmware/** from being accessed#26618

Merged
mlaventure merged 1 commit into
moby:masterfrom
AkihiroSuda:fix-apparmor
Sep 16, 2016
Merged

apparmor: prohibit /sys/firmware/** from being accessed#26618
mlaventure merged 1 commit into
moby:masterfrom
AkihiroSuda:fix-apparmor

Conversation

@AkihiroSuda

Copy link
Copy Markdown
Member

Some firmware information including SMBIOS and ACPI tables were unexpectedly exposed.
Basically they shouldn't contain sensitive information, but some exceptions:

  • /sys/firmware/acpi/tables/{SLIC,MSDM}: Windows license information: http://feishare.com/attachments/article/265/microsoft-software-licensing-tables.pdf (original copy at microsoft.com seems 404)
  • /sys/firmware/ibft/target0/chap-secret: iSCSI CHAP secret: ftp://ftp.software.ibm.com/systems/support/bladecenter/iscsi_boot_firmware_table_v1.03.pdf
  • Other vendor-specific information (Anyone know? DMI can be a vulnerability in some specific case?)

I think this issue should be fixed but not critical.

- What I did
Prohibit /sys/firmware/** from being accessed.

- How I did it
Modified the template for the default apparmor profile

- How to verify it

$ docker run --rm alpine sh -c 'for f in $(find /sys/firmware/acpi/tables -type f); do echo $f; hexdump -C $f; done'
find: /sys/firmware/acpi/tables: Permission denied
$ docker run --rm alpine sh -c 'apk update && apk add dmidecode && dmidecode'
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
v3.4.3-62-gaaf1b40 [http://dl-cdn.alpinelinux.org/alpine/v3.4/main]
v3.4.3-62-gaaf1b40 [http://dl-cdn.alpinelinux.org/alpine/v3.4/community]
OK: 5973 distinct packages available
(1/1) Installing dmidecode (3.0-r0)
Executing busybox-1.24.2-r9.trigger
OK: 5 MiB in 12 packages
dmidecode 3.0
Scanning /dev/mem for entry point.
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied
/dev/mem: No such file or directory

- Description for the changelog

apparmor: prohibit /sys/firmware/** from being accessed

- A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Akihiro Suda suda.akihiro@lab.ntt.co.jp

Some firmware information including SMBIOS and ACPI tables were unexpectedly exposed

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
@AkihiroSuda

Copy link
Copy Markdown
Member Author

CC @cyphar @justincormack

@justincormack

Copy link
Copy Markdown
Contributor

I can't see any valid use cases for accessing this directory so LGTM.

@cyphar

cyphar commented Sep 16, 2016

Copy link
Copy Markdown
Contributor

IANAM, but lgtm.

@mlaventure

Copy link
Copy Markdown
Contributor

LGTM

@mlaventure mlaventure added this to the 1.13.0 milestone Sep 16, 2016
@mlaventure mlaventure merged commit 07b5311 into moby:master Sep 16, 2016
AkihiroSuda added a commit to AkihiroSuda/docker that referenced this pull request Sep 20, 2016
TestBuildApiDockerFileRemote has been consistently failing (EPERM) on the host
with moby#26618, which prohibits /sys/firmware from being accessed using apparmor.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
liusdu pushed a commit to liusdu/moby that referenced this pull request Oct 30, 2017
TestBuildApiDockerFileRemote has been consistently failing (EPERM) on the host
with moby#26618, which prohibits /sys/firmware from being accessed using apparmor.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Signed-off-by: majiuyue 00385406 <majiuyue@huawei.com>
liusdu pushed a commit to liusdu/moby that referenced this pull request Oct 30, 2017
Fix flaky test: TestBuildApiDockerFileRemote

TestBuildApiDockerFileRemote has been consistently failing (EPERM) on the host
with moby#26618, which prohibits /sys/firmware from being accessed using apparmor.

Cherry-pick from moby#26720

fix issue moby#183 

Issues info:
Issue ID: 183
Title: flaky test: TestBuildApiDockerFileRemote
Issue url: moby#183

See merge request docker/docker!294
tbaumann added a commit to tbaumann/homeassistant-addons that referenced this pull request Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants