[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torsocks/master] Deny unsupported syscall() number for safety



commit 357b465b42691d845de2b6ceceb847c2db85ffb8
Author: David Goulet <dgoulet@xxxxxxxxx>
Date:   Fri Aug 23 19:08:05 2013 -0400

    Deny unsupported syscall() number for safety
    
    Until we support all possible syscall() number, relevant to network
    communication, we deny them for now just to be safe.
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxx>
---
 src/lib/syscall.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/lib/syscall.c b/src/lib/syscall.c
index 5cb9e8f..c2cd114 100644
--- a/src/lib/syscall.c
+++ b/src/lib/syscall.c
@@ -84,7 +84,14 @@ LIBC_SYSCALL_RET_TYPE tsocks_syscall(long int __number, va_list args)
 		ret = handle_close(args);
 		break;
 	default:
-		ret = tsocks_libc_syscall(__number, args);
+		/*
+		 * Deny call since we have no idea if this call can leak or not data
+		 * off the Tor network.
+		 */
+		WARN("[syscall] Unsupported syscall number %ld. Denying the call",
+				__number);
+		ret = -1;
+		errno = ENOSYS;
 		break;
 	}
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits