diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-03-07 10:19:05 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-03-07 10:29:36 -0800 |
commit | e3afe5dd3abea43e056a004df02fb49f24cc5ad7 (patch) | |
tree | a8f38510fe1aeee32a54112fdee27e1948cde35e /net/xfrm/xfrm_user.c | |
parent | a148f82c457f957cdc9445101882c225aa8c3ff0 (diff) | |
parent | df4793505abd5df399bc6d9a4d8fe81761f557cd (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
No conflicts.
Adjacent changes:
net/core/page_pool_user.c
0b11b1c5c320 ("netdev: let netlink core handle -EMSGSIZE errors")
429679dcf7d9 ("page_pool: fix netlink dump stop/resume")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r-- | net/xfrm/xfrm_user.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index a5232dcfea46..810b520493f3 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -2017,6 +2017,9 @@ static int copy_to_user_tmpl(struct xfrm_policy *xp, struct sk_buff *skb) if (xp->xfrm_nr == 0) return 0; + if (xp->xfrm_nr > XFRM_MAX_DEPTH) + return -ENOBUFS; + for (i = 0; i < xp->xfrm_nr; i++) { struct xfrm_user_tmpl *up = &vec[i]; struct xfrm_tmpl *kp = &xp->xfrm_vec[i]; |