diff options
| author | Jakub Kicinski <[email protected]> | 2024-03-07 18:19:05 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-03-07 18:29:36 +0000 |
| commit | e3afe5dd3abea43e056a004df02fb49f24cc5ad7 (patch) | |
| tree | a8f38510fe1aeee32a54112fdee27e1948cde35e /net/xfrm/xfrm_user.c | |
| parent | Merge branch 'tcp-add-two-missing-addresses-when-using-trace' (diff) | |
| parent | Merge tag 'net-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff) | |
| download | kernel-e3afe5dd3abea43e056a004df02fb49f24cc5ad7.tar.gz kernel-e3afe5dd3abea43e056a004df02fb49f24cc5ad7.zip | |
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 <[email protected]>
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]; |
