Davide Caratti
f67169fef8
net/sched: act_pedit: fix WARN() in the traffic path
when configuring act_pedit rules, the number of keys is validated only on
addition of a new entry. This is not sufficient to avoid hitting a WARN()
in the traffic path: for example, it is possible to replace a valid entry
with a new one having 0 extended keys, thus causing splats in dmesg like:
pedit BUG: index 42
WARNING: CPU: 2 PID: 4054 at net/sched/act_pedit.c:410 tcf_pedit_act+0xc84/0x1200 [act_pedit]
[...]
RIP: 0010:tcf_pedit_act+0xc84/0x1200 [act_pedit]
Code: 89 fa 48 c1 ea 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e ac 00 00 00 48 8b 44 24 10 48 c7 c7 a0 c4 e4 c0 8b 70 18 e8 1c 30 95 ea <0f> 0b e9 a0 fa ff ff e8 00 03 f5 ea e9 14 f4 ff ff 48 89 58 40 e9
RSP: 0018:ffff888077c9f320 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffac2983a2
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff888053927bec
RBP: dffffc0000000000 R08: ffffed100a726209 R09: ffffed100a726209
R10: 0000000000000001 R11: ffffed100a726208 R12: ffff88804beea780
R13: ffff888079a77400 R14: ffff88804beea780 R15: ffff888027ab2000
FS: 00007fdeec9bd740(0000) GS:ffff888053900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffdb3dfd000 CR3: 000000004adb4006 CR4: 00000000001606e0
Call Trace:
tcf_action_exec+0x105/0x3f0
tcf_classify+0xf2/0x410
__dev_queue_xmit+0xcbf/0x2ae0
ip_finish_output2+0x711/0x1fb0
ip_output+0x1bf/0x4b0
ip_send_skb+0x37/0xa0
raw_sendmsg+0x180c/0x2430
sock_sendmsg+0xdb/0x110
__sys_sendto+0x257/0x2b0
__x64_sys_sendto+0xdd/0x1b0
do_syscall_64+0xa5/0x4e0
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fdeeb72e993
Code: 48 8b 0d e0 74 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 0d d6 2c 00 00 75 13 49 89 ca b8 2c 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 34 c3 48 83 ec 08 e8 4b cc 00 00 48 89 04 24
RSP: 002b:00007ffdb3de8a18 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 000055c81972b700 RCX: 00007fdeeb72e993
RDX: 0000000000000040 RSI: 000055c81972b700 RDI: 0000000000000003
RBP: 00007ffdb3dea130 R08: 000055c819728510 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000040
R13: 000055c81972b6c0 R14: 000055c81972969c R15: 0000000000000080
Fix this moving the check on 'nkeys' earlier in tcf_pedit_init(), so that
attempts to install rules having 0 keys are always rejected with -EINVAL.
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Davide Caratti <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
2019-11-19 18:57:16 -08:00 |
| .. |
|
6lowpan
|
|
|
|
9p
|
9p pull request for inclusion in 5.4
|
2019-09-27 15:10:34 -07:00 |
|
802
|
|
|
|
8021q
|
net: remove unnecessary variables and callback
|
2019-10-24 14:53:49 -07:00 |
|
appletalk
|
appletalk: enforce CAP_NET_RAW for raw sockets
|
2019-09-24 16:37:18 +02:00 |
|
atm
|
net: atm: Reduce the severity of logging in unlink_clip_vcc
|
2019-11-18 17:08:20 -08:00 |
|
ax25
|
ax25: enforce CAP_NET_RAW for raw sockets
|
2019-09-24 16:37:18 +02:00 |
|
batman-adv
|
Here are two batman-adv bugfixes:
|
2019-10-28 16:39:07 -07:00 |
|
bluetooth
|
net: use skb_queue_empty_lockless() in poll() handlers
|
2019-10-28 13:33:41 -07:00 |
|
bpf
|
bpf/flow_dissector: support flags in BPF_PROG_TEST_RUN
|
2019-07-25 18:00:41 -07:00 |
|
bpfilter
|
|
|
|
bridge
|
bridge: ebtables: don't crash when using dnat target in output chains
|
2019-11-04 20:58:34 +01:00 |
|
caif
|
net: use skb_queue_empty_lockless() in poll() handlers
|
2019-10-28 13:33:41 -07:00 |
|
can
|
can: j1939: warn if resources are still linked on destroy
|
2019-11-13 10:42:34 +01:00 |
|
ceph
|
libceph: use ceph_kvmalloc() for osdmap arrays
|
2019-09-16 12:06:25 +02:00 |
|
core
|
devlink: Add method for time-stamp on reporter's dump
|
2019-11-11 16:04:21 -08:00 |
|
dcb
|
|
|
|
dccp
|
dccp: do not leak jiffies on the wire
|
2019-11-04 11:36:31 -08:00 |
|
decnet
|
net: use skb_queue_empty_lockless() in poll() handlers
|
2019-10-28 13:33:41 -07:00 |
|
dns_resolver
|
|
|
|
dsa
|
net: dsa: tag_8021q: Fix dsa_8021q_restore_pvid for an absent pvid
|
2019-11-16 12:23:53 -08:00 |
|
ethernet
|
|
|
|
hsr
|
|
|
|
ieee802154
|
net: core: add generic lockdep keys
|
2019-10-24 14:53:48 -07:00 |
|
ife
|
net: Fix Kconfig indentation
|
2019-09-26 08:56:17 +02:00 |
|
ipv4
|
net/ipv4: fix sysctl max for fib_multipath_hash_policy
|
2019-11-18 17:25:36 -08:00 |
|
ipv6
|
seg6: fix skb transport_header after decap_and_validate()
|
2019-11-16 12:18:32 -08:00 |
|
iucv
|
net/af_iucv: mark expected switch fall-throughs
|
2019-07-29 10:26:14 -07:00 |
|
kcm
|
kcm: disable preemption in kcm_parse_func_strparser()
|
2019-09-27 10:27:14 +02:00 |
|
key
|
|
|
|
l2tp
|
net: core: add generic lockdep keys
|
2019-10-24 14:53:48 -07:00 |
|
l3mdev
|
|
|
|
lapb
|
|
|
|
llc
|
net: silence KCSAN warnings around sk_add_backlog() calls
|
2019-10-09 21:42:59 -07:00 |
|
mac80211
|
mac80211: fix station inactive_time shortly after boot
|
2019-11-08 09:17:28 +01:00 |
|
mac802154
|
|
|
|
mpls
|
ipv4: mpls: fix mpls_xmit for iptunnel
|
2019-08-25 14:34:08 -07:00 |
|
ncsi
|
net/ncsi: Disable global multicast filter
|
2019-09-19 18:04:40 -07:00 |
|
netfilter
|
Merge branch 'master' of git://blackhole.kfki.hu/nf
|
2019-11-04 20:59:00 +01:00 |
|
netlabel
|
netlabel: remove redundant assignment to pointer iter
|
2019-09-01 11:45:02 -07:00 |
|
netlink
|
|
|
|
netrom
|
net: core: add generic lockdep keys
|
2019-10-24 14:53:48 -07:00 |
|
nfc
|
nfc: netlink: fix double device reference drop
|
2019-11-07 15:23:19 -08:00 |
|
nsh
|
|
|
|
openvswitch
|
netns: fix GFP flags in rtnl_net_notifyid()
|
2019-10-25 20:14:42 -07:00 |
|
packet
|
netfilter: drop bridge nf reset from nf_reset
|
2019-10-01 18:42:15 +02:00 |
|
phonet
|
net: use skb_queue_empty_lockless() in poll() handlers
|
2019-10-28 13:33:41 -07:00 |
|
psample
|
net: sched: take reference to psample group in flow_action infra
|
2019-09-16 09:18:03 +02:00 |
|
qrtr
|
net: qrtr: Stop rx_worker before freeing node
|
2019-09-21 18:45:46 -07:00 |
|
rds
|
rds: ib: update WR sizes when bringing up connection
|
2019-11-16 12:59:08 -08:00 |
|
rfkill
|
|
|
|
rose
|
net: core: add generic lockdep keys
|
2019-10-24 14:53:48 -07:00 |
|
rxrpc
|
rxrpc: Fix handling of last subpacket of jumbo packet
|
2019-10-31 12:23:09 -07:00 |
|
sched
|
net/sched: act_pedit: fix WARN() in the traffic path
|
2019-11-19 18:57:16 -08:00 |
|
sctp
|
inet: stop leaking jiffies on the wire
|
2019-11-01 14:57:52 -07:00 |
|
smc
|
net/smc: fix fastopen for non-blocking connect()
|
2019-11-16 13:03:33 -08:00 |
|
strparser
|
|
|
|
sunrpc
|
SUNRPC: Destroy the back channel when we destroy the host transport
|
2019-10-30 12:04:35 -04:00 |
|
switchdev
|
|
|
|
tipc
|
tipc: add back tipc prefix to log messages
|
2019-11-14 18:03:03 -08:00 |
|
tls
|
net/tls: enable sk_msg redirect to tls socket egress
|
2019-11-19 15:03:02 -08:00 |
|
unix
|
net: use skb_queue_empty_lockless() in poll() handlers
|
2019-10-28 13:33:41 -07:00 |
|
vmw_vsock
|
vsock/virtio: fix sock refcnt holding during the shutdown
|
2019-11-08 12:17:50 -08:00 |
|
wimax
|
wimax: no need to check return value of debugfs_create functions
|
2019-08-10 15:25:47 -07:00 |
|
wireless
|
nl80211: fix validation of mesh path nexthop
|
2019-10-30 10:11:18 +01:00 |
|
x25
|
net: silence KCSAN warnings around sk_add_backlog() calls
|
2019-10-09 21:42:59 -07:00 |
|
xdp
|
xsk: Fix registration of Rx-only sockets
|
2019-10-23 20:22:11 -07:00 |
|
xfrm
|
xfrm: release device reference for invalid state
|
2019-11-12 08:24:38 +01:00 |
|
compat.c
|
|
|
|
Kconfig
|
devlink: Add packet trap infrastructure
|
2019-08-17 12:40:08 -07:00 |
|
Makefile
|
|
|
|
socket.c
|
Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
|
2019-07-19 10:42:02 -07:00 |
|
sysctl_net.c
|
|
|