mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Move the syslog syscall to be gated by CAP_SYS_ADMIN or CAP_SYSLOG
This call is what is used to implement `dmesg` to get kernel messages about the host. This can leak substantial information about the host. It is normally available to unprivileged users on the host, unless the sysctl `kernel.dmesg_restrict = 1` is set, but this is not set by standard on the majority of distributions. Blocking this to restrict leaks about the configuration seems correct. Fix #37897 See also https://googleprojectzero.blogspot.com/2018/09/a-cache-invalidation-bug-in-linux.html Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
		
							parent
							
								
									97dcf6adf1
								
							
						
					
					
						commit
						ccd22ffcc8
					
				
					 2 changed files with 26 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -329,7 +329,6 @@
 | 
			
		|||
				"sync_file_range",
 | 
			
		||||
				"syncfs",
 | 
			
		||||
				"sysinfo",
 | 
			
		||||
				"syslog",
 | 
			
		||||
				"tee",
 | 
			
		||||
				"tgkill",
 | 
			
		||||
				"time",
 | 
			
		||||
| 
						 | 
				
			
			@ -561,6 +560,7 @@
 | 
			
		|||
				"setdomainname",
 | 
			
		||||
				"sethostname",
 | 
			
		||||
				"setns",
 | 
			
		||||
				"syslog",
 | 
			
		||||
				"umount",
 | 
			
		||||
				"umount2",
 | 
			
		||||
				"unshare"
 | 
			
		||||
| 
						 | 
				
			
			@ -762,6 +762,20 @@
 | 
			
		|||
				]
 | 
			
		||||
			},
 | 
			
		||||
			"excludes": {}
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"names": [
 | 
			
		||||
				"syslog"
 | 
			
		||||
			],
 | 
			
		||||
			"action": "SCMP_ACT_ALLOW",
 | 
			
		||||
			"args": [],
 | 
			
		||||
			"comment": "",
 | 
			
		||||
			"includes": {
 | 
			
		||||
				"caps": [
 | 
			
		||||
					"CAP_SYSLOG"
 | 
			
		||||
				]
 | 
			
		||||
			},
 | 
			
		||||
			"excludes": {}
 | 
			
		||||
		}
 | 
			
		||||
	]
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -322,7 +322,6 @@ func DefaultProfile() *types.Seccomp {
 | 
			
		|||
				"sync_file_range",
 | 
			
		||||
				"syncfs",
 | 
			
		||||
				"sysinfo",
 | 
			
		||||
				"syslog",
 | 
			
		||||
				"tee",
 | 
			
		||||
				"tgkill",
 | 
			
		||||
				"time",
 | 
			
		||||
| 
						 | 
				
			
			@ -492,6 +491,7 @@ func DefaultProfile() *types.Seccomp {
 | 
			
		|||
				"setdomainname",
 | 
			
		||||
				"sethostname",
 | 
			
		||||
				"setns",
 | 
			
		||||
				"syslog",
 | 
			
		||||
				"umount",
 | 
			
		||||
				"umount2",
 | 
			
		||||
				"unshare",
 | 
			
		||||
| 
						 | 
				
			
			@ -642,6 +642,16 @@ func DefaultProfile() *types.Seccomp {
 | 
			
		|||
				Caps: []string{"CAP_SYS_NICE"},
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			Names: []string{
 | 
			
		||||
				"syslog",
 | 
			
		||||
			},
 | 
			
		||||
			Action: types.ActAllow,
 | 
			
		||||
			Args:   []*types.Arg{},
 | 
			
		||||
			Includes: types.Filter{
 | 
			
		||||
				Caps: []string{"CAP_SYSLOG"},
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return &types.Seccomp{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue