ktrace stops writing trace file if "filesize" limit is enabled by traced process. Fix: Unknown How-To-Repeat: Compile this test code: cc -o example example.c It needs two command line arguments: filesize limit (in bytes) and some user's uid (f.e., 65534 for "nobody"). #include <sys/types.h> #include <sys/resource.h> #include <stdlib.h> #include <unistd.h> int main(int argc, char *argv[]) { struct rlimit rl; if (argc > 2) { rl.rlim_cur = atol(argv[1]); setrlimit(RLIMIT_FSIZE, &rl); seteuid(atol(argv[2])); while(1) usleep(10); } return 0; } Use kernel with "options KTRACE" and run the example as root, it breaks as soon as trace file size hits limit: # ktrace ./example 100000 65535 Filesize limit exceeded: 25 Note that traced code does not write anything, it runs as another user and sets limit for itself only and not for ktrace. This makes it difficult to debug real services using "filesize" limit like stock ftpd serving users with limited login class assigned.
Responsible Changed From-To: freebsd-bugs->secteam For review / check to sectaem
Responsible Changed From-To: secteam->freebsd-bugs Not a security issue.
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
Fixed as of https://cgit.freebsd.org/src/commit/?id=02645b886bc62dfd8a998fd51d2e6c1bbca03ecb