Skip top menus
National Security Agency and Central Security Service with agency logos.NSA/CSS Memorial Wall
Home    About NSA    Research    Business    Careers    Public Info    History
Introduction to Research    Security-Enhanced Linux    Information Assurance Research    Technology Transfer    Publications    Related Links

>>SELinux Mailing List: by thread

Search
What's new?
Contents
Overview
What's New
Frequently Asked Questions
Background
Documentation
License
Download
Participating
Mail List
Archive Summary
Archive by Thread
Archive by Author
Archive by Date
Archive by Subject
Remaining Work
Contributors
Related Work
Press Releases
  • Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]
From: Stephen Smalley <sds_at_tislabs.com>
subject: [PATCH] Bug fix for file alloc_security hook call
Date: Thu, 6 Sep 2001 10:25:38 -0400 (EDT)
  • This message: [ Message body ]
  • Next message: Carlos Cardenas: "UltraSparc"
  • Previous message: James Morris: "[PATCH] safe memory allocation flags"

The attached patch fixes a bug in the LSM kernel patch that was causing the security attributes on struct file objects to be immediately clobbered after allocation (and a memory leak). To apply, save the patch to file_table.patch, change to the lsm directory and run 'patch -p1 < file_table.patch'.

--

Stephen D. Smalley, NAI Labs
ssmalley@nai.com

Index: lsm/fs/file_table.c
diff -u lsm/fs/file_table.c:1.3 lsm/fs/file_table.c:1.4
--- lsm/fs/file_table.c:1.3 Wed Jun 13 12:20:28 2001
+++ lsm/fs/file_table.c Wed Sep 5 16:12:41 2001 @@ -41,13 +41,13 @@

 		list_del(&f->f_list);
 		files_stat.nr_free_files--;
 	new_one:
+		memset(f, 0, sizeof(*f));
 		if (security_ops->file_ops->alloc_security(f)) {
 			list_add(&f->f_list, &free_list);
 			files_stat.nr_free_files++;
 			file_list_unlock();
 			return NULL;
 		}
-		memset(f, 0, sizeof(*f));
 		atomic_set(&f->f_count,1);
 		f->f_version = ++event;
 		f->f_uid = current->fsuid;

--

You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message.

  • Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

This archive was generated by hypermail 2.2.0 on Wed 11 Jun 2008 - 08:10:54 EDT

Information Assurance | Signals & Intelligence        Links | Accessibility | Privacy & Security