diff options
| author | Greg Kroah-Hartman <gregkh@google.com> | 2019-09-16 09:51:32 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@google.com> | 2019-09-16 09:51:32 +0200 |
| commit | 83f541302cae9c20bf3d64dfca4e093e61bb2aa4 (patch) | |
| tree | 1be66d6c895531060eb07308415588d999a602c8 /net | |
| parent | 72c5343cdbc5ec257e45d5387ed7220065c2ecff (diff) | |
| parent | e19c5132f78a70cc53745558c0e728fecc74030a (diff) | |
Merge 4.4.193 into android-4.4-p
Changes in 4.4.193
ALSA: hda - Fix potential endless loop at applying quirks
ALSA: hda/realtek - Fix overridden device-specific initialization
xfrm: clean up xfrm protocol checks
vhost/test: fix build for vhost test
scripts/decode_stacktrace: match basepath using shell prefix operator, not regex
clk: s2mps11: Add used attribute to s2mps11_dt_match
x86, boot: Remove multiple copy of static function sanitize_boot_params()
af_packet: tone down the Tx-ring unsupported spew.
vhost: make sure log_num < in_num
Linux 4.4.193
Change-Id: If2283bf8bc29f3deaf1c047c8ec9e502fbdf0521
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'net')
| -rw-r--r-- | net/key/af_key.c | 4 | ||||
| -rw-r--r-- | net/packet/af_packet.c | 2 | ||||
| -rw-r--r-- | net/xfrm/xfrm_state.c | 2 | ||||
| -rw-r--r-- | net/xfrm/xfrm_user.c | 14 |
4 files changed, 6 insertions, 16 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 36db179d848e..d2ec620319d7 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -1969,8 +1969,10 @@ parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq) if (rq->sadb_x_ipsecrequest_mode == 0) return -EINVAL; + if (!xfrm_id_proto_valid(rq->sadb_x_ipsecrequest_proto)) + return -EINVAL; - t->id.proto = rq->sadb_x_ipsecrequest_proto; /* XXX check proto */ + t->id.proto = rq->sadb_x_ipsecrequest_proto; if ((mode = pfkey_mode_to_xfrm(rq->sadb_x_ipsecrequest_mode)) < 0) return -EINVAL; t->mode = mode; diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 5d8988185c59..0dd9fc3f57e8 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -4176,7 +4176,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u, /* Opening a Tx-ring is NOT supported in TPACKET_V3 */ if (!closing && tx_ring && (po->tp_version > TPACKET_V2)) { - WARN(1, "Tx-ring is not supported.\n"); + net_warn_ratelimited("Tx-ring is not supported.\n"); goto out; } diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 6475d18149c0..d73c66a64226 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -2128,7 +2128,7 @@ void xfrm_state_fini(struct net *net) unsigned int sz; flush_work(&net->xfrm.state_hash_work); - xfrm_state_flush(net, IPSEC_PROTO_ANY, false); + xfrm_state_flush(net, 0, false); flush_work(&net->xfrm.state_gc_work); WARN_ON(!list_empty(&net->xfrm.state_all)); diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 46366810e93e..69126af39c79 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -1456,20 +1456,8 @@ static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) return -EINVAL; } - switch (ut[i].id.proto) { - case IPPROTO_AH: - case IPPROTO_ESP: - case IPPROTO_COMP: -#if IS_ENABLED(CONFIG_IPV6) - case IPPROTO_ROUTING: - case IPPROTO_DSTOPTS: -#endif - case IPSEC_PROTO_ANY: - break; - default: + if (!xfrm_id_proto_valid(ut[i].id.proto)) return -EINVAL; - } - } return 0; |
