[tor-bugs] #27315 [Core Tor/Tor]: Sandbox regression in 0.3.4.7-rc

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jan 11 16:34:36 UTC 2019


#27315: Sandbox regression in 0.3.4.7-rc
---------------------------------------+-----------------------------------
 Reporter:  toralf                     |          Owner:  (none)
     Type:  defect                     |         Status:  needs_information
 Priority:  Medium                     |      Milestone:  Tor:
                                       |  0.3.4.x-final
Component:  Core Tor/Tor               |        Version:  Tor: 0.3.4.7-rc
 Severity:  Normal                     |     Resolution:
 Keywords:  regression?, 034-backport  |  Actual Points:
Parent ID:                             |         Points:
 Reviewer:  ahf                        |        Sponsor:
---------------------------------------+-----------------------------------

Comment (by toralf):

 This is at my hardened Gentoo relay:
 {{{
 mr-fox ~ # gcc test.c -o test -l seccomp
 test.c: In function ‘main’:
 test.c:92:14: warning: format ‘%llu’ expects argument of type ‘long long
 unsigned int’, but argument 2 has type ‘int’ [-Wformat=]
    printf("%llu %llu\n", AT_FDCWD, (unsigned int)AT_FDCWD);
            ~~~^
            %u
 test.c:92:19: warning: format ‘%llu’ expects argument of type ‘long long
 unsigned int’, but argument 3 has type ‘unsigned int’ [-Wformat=]
    printf("%llu %llu\n", AT_FDCWD, (unsigned int)AT_FDCWD);
                 ~~~^
                 %u
 mr-fox ~ # ./test
 Testing rule before fix.
 #
 # pseudo filter code start
 #
 # filter for arch x86_64 (3221225534)
 if ($arch == 3221225534)
   # filter for syscall "fstat64" (-10010) [priority: 65535]
   if ($syscall == -10010)
     action ALLOW;
   # filter for syscall "exit_group" (231) [priority: 65535]
   if ($syscall == 231)
     action ALLOW;
   # filter for syscall "rt_sigreturn" (15) [priority: 65535]
   if ($syscall == 15)
     action ALLOW;
   # filter for syscall "fstat" (5) [priority: 65535]
   if ($syscall == 5)
     action ALLOW;
   # filter for syscall "write" (1) [priority: 65535]
   if ($syscall == 1)
     action ALLOW;
   # filter for syscall "read" (0) [priority: 65535]
   if ($syscall == 0)
     action ALLOW;
   # filter for syscall "openat" (257) [priority: 65531]
   if ($syscall == 257)
     if ($a0.hi32 == 4294967295)
       if ($a0.lo32 == 4294967196)
         if ($a1.hi32 == 22044)
           if ($a1.lo32 == 1279610616)
             action ALLOW;
   # default action
   action KILL;
 # invalid architecture action
 action KILL;
 #
 # pseudo filter code end
 #
 GNU libc version: 2.27
 GNU libc release: stable
 libseccomp 2.3.3
 18446744073709551516 4294967196
 4294967196 4294967196
 Before openat
 Bad system call
 mr-fox ~ # ./test foo
 Testing rule before fix.
 #
 # pseudo filter code start
 #
 # filter for arch x86_64 (3221225534)
 if ($arch == 3221225534)
   # filter for syscall "fstat64" (-10010) [priority: 65535]
   if ($syscall == -10010)
     action ALLOW;
   # filter for syscall "exit_group" (231) [priority: 65535]
   if ($syscall == 231)
     action ALLOW;
   # filter for syscall "rt_sigreturn" (15) [priority: 65535]
   if ($syscall == 15)
     action ALLOW;
   # filter for syscall "fstat" (5) [priority: 65535]
   if ($syscall == 5)
     action ALLOW;
   # filter for syscall "write" (1) [priority: 65535]
   if ($syscall == 1)
     action ALLOW;
   # filter for syscall "read" (0) [priority: 65535]
   if ($syscall == 0)
     action ALLOW;
   # filter for syscall "openat" (257) [priority: 65531]
   if ($syscall == 257)
     if ($a0.hi32 == 4294967295)
       if ($a0.lo32 == 4294967196)
         if ($a1.hi32 == 22046)
           if ($a1.lo32 == 1081806584)
             action ALLOW;
   # default action
   action KILL;
 # invalid architecture action
 action KILL;
 #
 # pseudo filter code end
 #
 GNU libc version: 2.27
 GNU libc release: stable
 libseccomp 2.3.3
 18446744073709551516 4294967196
 4294967196 4294967196
 Before openat
 Bad system call
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27315#comment:16>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list