android_kernel_xiaomi_sm8350/net/dccp
Kuniyuki Iwashima e5a664ef49 dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses.
[ Upstream commit 23be1e0e2a83a8543214d2599a31d9a2185a796b ]

Initially, commit 4237c75c0a ("[MLSXFRM]: Auto-labeling of child
sockets") introduced security_inet_conn_request() in some functions
where reqsk is allocated.  The hook is added just after the allocation,
so reqsk's IPv6 remote address was not initialised then.

However, SELinux/Smack started to read it in netlbl_req_setattr()
after commit e1adea9270 ("calipso: Allow request sockets to be
relabelled by the lsm.").

Commit 284904aa79 ("lsm: Relocate the IPv4 security_inet_conn_request()
hooks") fixed that kind of issue only in TCPv4 because IPv6 labeling was
not supported at that time.  Finally, the same issue was introduced again
in IPv6.

Let's apply the same fix on DCCPv6 and TCPv6.

Fixes: e1adea9270 ("calipso: Allow request sockets to be relabelled by the lsm.")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 10:30:15 +01:00
..
ccids
ackvec.c
ackvec.h
ccid.c
ccid.h Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
dccp.h
diag.c
feat.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
feat.h
input.c
ipv4.c dccp: Call security_inet_conn_request() after setting IPv4 addresses. 2023-11-20 10:30:15 +01:00
ipv6.c dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses. 2023-11-20 10:30:15 +01:00
ipv6.h
Kconfig
Makefile
minisocks.c
options.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
output.c dccp: fix data-race around dp->dccps_mss_cache 2023-08-16 18:19:24 +02:00
proto.c dccp: annotate data-races in dccp_poll() 2023-08-30 16:27:23 +02:00
qpolicy.c
sysctl.c proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
timer.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
trace.h