Bug 695693 - [openssl] bind mounts allow FIPS mode checks to be bypassed
Summary: [openssl] bind mounts allow FIPS mode checks to be bypassed
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: openssl
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Steve Grubb
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-12 12:48 UTC by Bryn M. Reeves
Modified: 2011-07-26 10:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 695694 (view as bug list)
Environment:
Last Closed: 2011-07-26 10:49:15 UTC
Type: ---


Attachments (Terms of Use)

Description Bryn M. Reeves 2011-04-12 12:48:01 UTC
Description of problem:
The procfs file /proc/sys/crypto/fips_enabled is used to gate FIPS-compliant behaviour in userspace cryptography libraries.

When set to '1' during boot the kernel will reject attempts to write to this file as it is created with mode 0444.

A malicious administrator can bind mount a file containing a single '0' over this path causing userspace libraries to incorrectly behave as though FIPS was not enabled.

Version-Release number of selected component (if applicable):
openssl-1.0.0d-2.fc16 and earlier

How reproducible:
100%

Steps to Reproduce:
1. echo 0 > /tmp/my_fips_enabled
2. mount --bind /tmp/my_fips_enabled /proc/sys/crypto/fips_enabled
3. cat /proc/sys/crypto/fips_enabled
4. <do something forbidden in FIPS e.g. openssl md5 digest>
  
Actual results:
3. # cat /proc/sys/crypto/fips_enabled
0
4. FIPS forbidden operations work

Expected results:
4. FIPS forbidden operations fail

Additional info:

Comment 1 Tomas Mraz 2011-04-12 13:35:12 UTC
I do not think this is something that the library can guard against. There is a myriad of ways how to bypass the FIPS mode if especially (but not exclusively) the administrator wants to.

Comment 2 Bryn M. Reeves 2011-04-12 16:27:00 UTC
Agreed - I noticed this last week (while testing FIPS changes for sos) and mentioned it to sgrubb who asked me to file a bug. Apparently since then it's been discussed on the FIPS list with the conclusion that this is hard if not impossible to avoid. Am happy with whatever disposition the relevant folks have for this bz ;)


Note You need to log in before you can comment on or make changes to this bug.