android_kernel_samsung_sm8650/include/uapi
Nicolas Dichtel 1d39b94f8c UPSTREAM: ipv{4,6}/raw: fix output xfrm lookup wrt protocol
With a raw socket bound to IPPROTO_RAW (ie with hdrincl enabled), the
protocol field of the flow structure, build by raw_sendmsg() /
rawv6_sendmsg()),  is set to IPPROTO_RAW. This breaks the ipsec policy
lookup when some policies are defined with a protocol in the selector.

For ipv6, the sin6_port field from 'struct sockaddr_in6' could be used to
specify the protocol. Just accept all values for IPPROTO_RAW socket.

For ipv4, the sin_port field of 'struct sockaddr_in' could not be used
without breaking backward compatibility (the value of this field was never
checked). Let's add a new kind of control message, so that the userland
could specify which protocol is used.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
CC: stable@vger.kernel.org
Change-Id: I168bca9e37561b255268414e2fdfac18cd08381c
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Link: https://lore.kernel.org/r/20230522120820.1319391-1-nicolas.dichtel@6wind.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
(cherry picked from commit 3632679d9e4f879f49949bb5b050e0de553e4739)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-06-07 14:24:50 +00:00
..
asm-generic hugetlb_encode.h: fix undefined behaviour (34 << 26) 2022-10-03 14:02:55 -07:00
drm drm/virtio: exbuf->fence_fd unmodified on interrupted wait 2023-02-14 19:11:45 +01:00
linux UPSTREAM: ipv{4,6}/raw: fix output xfrm lookup wrt protocol 2023-06-07 14:24:50 +00:00
misc This update includes the following changes: 2022-10-10 13:04:25 -07:00
mtd This pull request contains updates for UBI and UBIFS 2022-10-14 18:23:23 -07:00
rdma RDMA/hns: Fix incorrect sge nums calculation 2022-12-31 13:32:33 +01:00
scsi FROMGIT: scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg 2023-03-15 16:17:14 +00:00
sound ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT 2022-12-31 13:32:14 +01:00
video
xen Improve docs for IOCTL_GNTDEV_MAP_GRANT_REF 2022-02-03 08:23:32 +01:00
Kbuild