Impact: ecryptfs can cause loss of data in certain scenarios
Patch Description: cherry-picked 2.6.25.y d3e49afbb66109613c3474f2273f5830ac2dcb09. The page decrypt calls in ecryptfs_write() are both pointless and buggy. Pointless because ecryptfs_get_locked_page() has already brought the page up to date, and buggy because prior mmap writes will just be blown away by the decrypt call. This patch also removes the declaration of a now-nonexistent function ecryptfs_write_zeros().
SRU Justification:
Impact: ecryptfs can cause loss of data in certain scenarios
Patch Description: cherry-picked 2.6.25.y d3e49afbb661096 13c3474f2273f58 30ac2dcb09. The page decrypt calls in ecryptfs_write() are both pointless and buggy. Pointless because ecryptfs_ get_locked_ page() has already brought the page up to date, and buggy because prior mmap writes will just be blown away by the decrypt call. This patch also removes the declaration of a now-nonexistent function ecryptfs_ write_zeros( ).
Patch: http:// kernel. ubuntu. com/git? p=ubuntu/ ubuntu- hardy.git; a=commit; h=b85452a23dcde ddc4a4ae1816501 e80a16bb14a8
Test Case: see Bug decscription