Opened 7 months ago

Last modified 4 months ago

#29769 assigned defect

[syscall] Unsupported syscall number 316. Denying the call (in tsocks_syscall() at syscall.c:615)

Reported by: tu8367 Owned by:
Priority: Medium Milestone:
Component: Core Tor/Torsocks Version: Tor: 0.3.5.8
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: #29659 Points:
Reviewer: Sponsor:

Description

[syscall] Unsupported syscall number 316. Denying the call (in tsocks_syscall() at syscall.c:615)

Platform is Linux x86_64, torsocks 2.3.0.
Creating a child to save entering the background.

https://filippo.io/linux-syscall-table/ doesn't have a #316 entry. How was #217 resolved to getdents64, #39 to getpid, and so on?
How could I avoid over striking #316 and the 2 other?

Child Tickets

Change History (2)

comment:1 Changed 7 months ago by tu8367

According to http://blog.rchapman.org/posts/Linux_System_Call_Table_for_x86_64/, 316 is sys_renameat2. It involves int olddfd, const char user *oldname, int newdfd, const char user *newname, unsigned int flags.

Oh, the Linux kernel has arch/x86/entry/syscalls/syscall_64.tbl. And 316 is in the table. So it is renameat2. A manual page is, for example, http://man7.org/linux/man-pages/man2/rename.2.html. It is the same page for rename, and renameat. As far as I can tell, all three are not supported by torsocks. from arch/x86/entry/syscalls/syscall_64.tbl, rename is 82 and renameat is 264.

Just modifying the source code of the parent test code:

#include <unistd.h>
#include <stdio.h>

int main(void) {
	printf("%d\n", (int)syscall(82)); // lazy
	printf("%d\n", (int)syscall(264)); //lazy
	printf("%d\n", (int)syscall(316)); // lazy
	return 0;
}

Output under torsocks is:

1552501146 WARNING torsocks[6770]: [syscall] Unsupported syscall number 82. Denying the call (in tsocks_syscall() at syscall.c:615)
-1
1552501146 WARNING torsocks[6770]: [syscall] Unsupported syscall number 264. Denying the call (in tsocks_syscall() at syscall.c:615)
-1
1552501146 WARNING torsocks[6770]: [syscall] Unsupported syscall number 316. Denying the call (in tsocks_syscall() at syscall.c:615)
-1
Last edited 7 months ago by tu8367 (previous) (diff)

comment:2 Changed 4 months ago by gaba

Owner: dgoulet deleted
Status: newassigned

removing dgoulet from ownership in torsocks component

Note: See TracTickets for help on using tickets.