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
nexedi
linux
Commits
ffd9bf50
Commit
ffd9bf50
authored
Jul 30, 2003
by
Bart De Schuymer
Committed by
Stephen Hemminger
Jul 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETFILTER]: Fix use after free of skb in nf_reinject().
parent
b1e24b12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
net/core/netfilter.c
net/core/netfilter.c
+12
-13
No files found.
net/core/netfilter.c
View file @
ffd9bf50
...
@@ -557,6 +557,18 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
...
@@ -557,6 +557,18 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
rcu_read_lock
();
rcu_read_lock
();
/* Release those devices we held, or Alexey will kill me. */
if
(
info
->
indev
)
dev_put
(
info
->
indev
);
if
(
info
->
outdev
)
dev_put
(
info
->
outdev
);
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
if
(
skb
->
nf_bridge
)
{
if
(
skb
->
nf_bridge
->
physindev
)
dev_put
(
skb
->
nf_bridge
->
physindev
);
if
(
skb
->
nf_bridge
->
physoutdev
)
dev_put
(
skb
->
nf_bridge
->
physoutdev
);
}
#endif
/* Drop reference to owner of hook which queued us. */
/* Drop reference to owner of hook which queued us. */
module_put
(
info
->
elem
->
owner
);
module_put
(
info
->
elem
->
owner
);
...
@@ -599,19 +611,6 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
...
@@ -599,19 +611,6 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
}
}
rcu_read_unlock
();
rcu_read_unlock
();
/* Release those devices we held, or Alexey will kill me. */
if
(
info
->
indev
)
dev_put
(
info
->
indev
);
if
(
info
->
outdev
)
dev_put
(
info
->
outdev
);
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
if
(
skb
->
nf_bridge
)
{
if
(
skb
->
nf_bridge
->
physindev
)
dev_put
(
skb
->
nf_bridge
->
physindev
);
if
(
skb
->
nf_bridge
->
physoutdev
)
dev_put
(
skb
->
nf_bridge
->
physoutdev
);
}
#endif
if
(
verdict
==
NF_DROP
)
if
(
verdict
==
NF_DROP
)
kfree_skb
(
skb
);
kfree_skb
(
skb
);
...
...
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