file not initialized to 0s under some conditions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
In Progress
|
High
|
Unassigned | ||
Precise |
Invalid
|
Undecided
|
Unassigned | ||
Trusty |
Fix Committed
|
High
|
Unassigned | ||
Utopic |
Won't Fix
|
High
|
Unassigned | ||
linux-lts-trusty (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Precise |
Won't Fix
|
High
|
Unassigned | ||
Trusty |
Invalid
|
Undecided
|
Unassigned | ||
Utopic |
Invalid
|
Undecided
|
Unassigned |
Bug Description
SRU Justification:
[Impact]
Under some conditions, after fallocate() the file is observed not to be completely initilized to 0s: some 4KB pages have left-over data from previous files that occupied those pages. Note that in addition to causing functional problems for applications expecting files to be initialized to 0s, this is a security issue because it allows data to "leak" from one file to another, bypassing file access controls.
The problem has been seen running under the following VMWare-based virtual environments:
Fusion 6.0.2
ESXi 5.1.0
And under the following versions of Ubuntu:
Ubuntu 12.04, 3.11.0-26-generic
Ubuntu 14.04.1, 3.13.0-32-generic
Ubuntu 14.04.1, 3.13.0-35-generic
But did not reproduce under the following version:
Ubuntu 10.04, 2.6.32-38-server
The problem reproduced under LVM, but did not reproduce without LVM.
[Test Case]
I reproduced the problem as follows under VMWare Fusion:
set up custom VM with default disk size (20 GB) and memory size (1 GB)
attach Ubuntu 14.04.1 ISO to CDROM, set it as boot device, boot up
select all defaults during installation _including_ LVM
install gcc
unpack the attached repro.tgz
run repro.sh
what it does:
* fills the disk with a file containing bytes of 0xcc then deletes it
* repeatedly runs the repro program which creates two files and accesses them in a certain pattern
* checks the file f0 with hexdump; it should contain all 0s, but if pages 0x1000-0x7000 contain 0xcc you have reproduced the problem
If the problem does not appear to reproduce, please try waiting a bit and checking the f0 files with hexdump again. This behavior was observed by a customer reproducing the problem under ESXi. I since added an sync after the running the repro binary which I think will fix that.
If you still can't reproduce the problem please let me know if there's anything I can do to help. For example can we trace the disk accesses at the SCSI level to verify whether the appropriate SCSI commands are being sent? This may help determine whether the problem is in Linux or in VMWare.
[Fix]
mptfusion: enable no_write_same in scsi_host_template
commit 4089b71cc820a42
https:/
(Note this patch may be reverted in the future as there is active discussion upstream about a more generic fix)
Changed in linux (Ubuntu): | |
importance: | Undecided → Critical |
description: | updated |
Changed in linux (Ubuntu): | |
assignee: | Canonical Kernel Team (canonical-kernel-team) → Chris J Arges (arges) |
Changed in linux (Ubuntu): | |
status: | Incomplete → In Progress |
information type: | Public → Public Security |
tags: | added: kernel-da-key |
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Trusty): | |
status: | New → Fix Committed |
tags: | added: patch |
no longer affects: | linux (Ubuntu Precise) |
Changed in linux-lts-trusty (Ubuntu Trusty): | |
status: | New → Invalid |
Changed in linux (Ubuntu Precise): | |
status: | New → Invalid |
Changed in linux-lts-trusty (Ubuntu Precise): | |
status: | New → Triaged |
summary: |
- file not initialized to 0s under some conditions on VMWare + file not initialized to 0s under some conditions |
description: | updated |
Changed in linux-lts-trusty (Ubuntu Utopic): | |
status: | New → Invalid |
Changed in linux (Ubuntu Utopic): | |
assignee: | nobody → Chris J Arges (arges) |
status: | New → Triaged |
tags: | added: kernel-bug-exists-upstream-v3.17-rc1 |
Changed in linux (Ubuntu Utopic): | |
status: | In Progress → Fix Committed |
Changed in linux-lts-trusty (Ubuntu Precise): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Trusty): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu): | |
assignee: | Chris J Arges (arges) → nobody |
Changed in linux (Ubuntu Trusty): | |
assignee: | Chris J Arges (arges) → nobody |
Changed in linux (Ubuntu Utopic): | |
assignee: | Chris J Arges (arges) → nobody |
Changed in linux-lts-trusty (Ubuntu Precise): | |
assignee: | Chris J Arges (arges) → nobody |
This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:
apport-collect 1371591
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.