Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
69dea591
Commit
69dea591
authored
Feb 06, 2003
by
James Morris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV4]: Fix skb leak in inet_rtm_getroute.
parent
44a215d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
net/ipv4/route.c
net/ipv4/route.c
+9
-7
No files found.
net/ipv4/route.c
View file @
69dea591
...
...
@@ -2288,7 +2288,7 @@ int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg)
struct
net_device
*
dev
=
__dev_get_by_index
(
iif
);
err
=
-
ENODEV
;
if
(
!
dev
)
goto
out
;
goto
out
_free
;
skb
->
protocol
=
htons
(
ETH_P_IP
);
skb
->
dev
=
dev
;
local_bh_disable
();
...
...
@@ -2307,10 +2307,8 @@ int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg)
fl
.
oif
=
oif
;
err
=
ip_route_output_key
(
&
rt
,
&
fl
);
}
if
(
err
)
{
kfree_skb
(
skb
);
goto
out
;
}
if
(
err
)
goto
out_free
;
skb
->
dst
=
&
rt
->
u
.
dst
;
if
(
rtm
->
rtm_flags
&
RTM_F_NOTIFY
)
...
...
@@ -2321,16 +2319,20 @@ int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg)
err
=
rt_fill_info
(
skb
,
NETLINK_CB
(
in_skb
).
pid
,
nlh
->
nlmsg_seq
,
RTM_NEWROUTE
,
0
);
if
(
!
err
)
goto
out
;
goto
out
_free
;
if
(
err
<
0
)
{
err
=
-
EMSGSIZE
;
goto
out
;
goto
out
_free
;
}
err
=
netlink_unicast
(
rtnl
,
skb
,
NETLINK_CB
(
in_skb
).
pid
,
MSG_DONTWAIT
);
if
(
err
>
0
)
err
=
0
;
out:
return
err
;
out_free:
kfree_skb
(
skb
);
goto
out
;
}
int
ip_rt_dump
(
struct
sk_buff
*
skb
,
struct
netlink_callback
*
cb
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment