History

time/namespace: Add max_time_namespaces ucount

Michael noticed that userns limit for number of time namespaces is missing. Furthermore, time namespace introduced UCOUNT_TIME_NAMESPACES, but didn't introduce an array member in user_table[]. It would make array's initialisation OOB write, but by luck the user_table array has an excessive empty member (all accesses to the array are limited with UCOUNT_COUNTS - so it silently reuses the last free member. Fixes user-visible regression: max_inotify_instances by reason of the missing UCOUNT_ENTRY() has limited max number of namespaces instead of the number of inotify instances.

Dmitry Safonov committed 6 years ago

Commit eeec26d1 parent b801f1e2 files · +7 −0Browse files

Showing the changes to kernel (1 of 2 files). Show all

Unified · Split

kernel/ucount.c+1−0
@@ -69,6 +69,7 @@ static struct ctl_table user_table[] = { · 68 unmodified lines
6969 UCOUNT_ENTRY("max_net_namespaces"),
7070 UCOUNT_ENTRY("max_mnt_namespaces"),
7171 UCOUNT_ENTRY("max_cgroup_namespaces"),
72+ UCOUNT_ENTRY("max_time_namespaces"),
7273 #ifdef CONFIG_INOTIFY_USER
7374 UCOUNT_ENTRY("max_inotify_instances"),
7475 UCOUNT_ENTRY("max_inotify_watches"),

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t