Skip to contentSkip to conversation

libsemanage direct_api can return errors < 0.

PATCH Daniel J Walsh 3 participants 3 messages Jun 8, 2009 – Jul 7, 2009 SELinux security module

lore
Share & tools
lore
#0 lore raw
src/direct_api.c +6 -6
@@ -991,7 +991,7 @@
 
 	int retval = -1;
 	char *data = NULL;
-	size_t data_len = 0;
+	ssize_t data_len = 0;
 	int compressed = 0;
 	int in_fd = -1;
 
@@ -999,7 +999,7 @@
 		return -1;
 	}
 
-	if ((data_len = map_file(in_fd, &data, &compressed)) == 0) {
+	if ((data_len = map_file(in_fd, &data, &compressed)) <= 0) {
 		goto cleanup;
 	}
 		
@@ -1117,7 +1117,7 @@
 {
 	int retval = -1;
 	char *data = NULL;
-	size_t data_len = 0;
+	ssize_t data_len = 0;
 	int compressed = 0;
 	int in_fd = -1;
 
@@ -1125,7 +1125,7 @@
 		return -1;
 	}
 
-	if ((data_len = map_file(in_fd, &data, &compressed)) == 0) {
+	if ((data_len = map_file(in_fd, &data, &compressed)) <= 0) {
 		goto cleanup;
 	}
 
@@ -1187,7 +1187,7 @@
 {
 	int retval = -1;
 	char *data = NULL;
-	size_t data_len = 0;
+	ssize_t data_len = 0;
 	int compressed = 0;
 	int in_fd;
 
@@ -1195,7 +1195,7 @@
 		return -1;
 	}
 
-	if ((data_len = map_file(in_fd, &data, &compressed)) == 0) {
+	if ((data_len = map_file(in_fd, &data, &compressed)) <= 0) {
 		goto cleanup;
 	}
 		
#1 lore raw

Daniel J Walsh wrote:

Merged.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw

Possible OpenSSH exploit

So far just rumors but this looks potentially scary:

http://seclists.org/fulldisclosure/2009/Jul/0028.html

http://isc.sans.org/diary.html?storyid=6742

One of my biggest reasons for using SE Linux for so long has been the hopeful mitigation of such exploits. If this is real and SE Linux mitigates it this could be serious validation for the whole SE Linux philosophy. If somehow we still get owned while running the latest SE Linux confined ssh I will be very disappointed.

Hopefully it's just a false alarm.

Signature · 2 lines
Tracy Reed
http://tracyreed.org