lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1174666198.11149.5.camel@localhost.localdomain>
Date:	Fri, 23 Mar 2007 12:09:58 -0400
From:	Mimi Zohar <zohar@...ux.vnet.ibm.com>
To:	linux-kernel@...r.kernel.org
Cc:	safford@...son.ibm.com, serue@...ux.vnet.ibm.com,
	kjhall@...ux.vnet.ibm.com, zohar@...ibm.com, staubach@...hat.com,
	akpm@...l.org
Subject: [Patch 5/7] integrity: mtime patch for mmap files

mmaped files are hashed and hmac'ed properly by EVM after being modified
when the file's mtime is updated correctly.  Peter Staubach's 'memory
mapped files not updating timestamps v2' patch properly updates the
mmapped file's mtime.  In those cases when an application does not
first msync the file before calling munmap, the mtime is eventually
updated, but not before file_close is called.  This patch forces the
mtime for mmaped files to be updated in a timely manner.

signed-off-by: Mimi Zohar <zohar@...ibm.com>
----
Index: linux-2.6.21-rc4-mm1/mm/mmap.c
===================================================================
--- linux-2.6.21-rc4-mm1.orig/mm/mmap.c
+++ linux-2.6.21-rc4-mm1/mm/mmap.c
@@ -1790,6 +1790,7 @@ int do_munmap(struct mm_struct *mm, unsi
 {
 	unsigned long end;
 	struct vm_area_struct *vma, *prev, *last;
+	struct file *file;
 
 	if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
 		return -EINVAL;
@@ -1808,6 +1809,10 @@ int do_munmap(struct mm_struct *mm, unsi
 	if (vma->vm_start >= end)
 		return 0;
 
+	file = vma->vm_file;
+	if (file && test_and_clear_bit(AS_MCTIME, &file->f_mapping->flags))
+		file_update_time(file);
+
 	/*
 	 * If we need to split any vma, do it now to save pain later.
 	 *






-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ