* [B.A.T.M.A.N.] Possible null pointer dereference in batman's update_routes
@ 2008-09-27 16:31 Sven Eckelmann
2008-09-27 17:20 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2008-09-27 16:31 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 483 bytes --]
Hi,
I am not sure but I think it could be possible that there is a null pointer
dereference at batman.c:420
I assume that it is possible that neigh_node is NULL and orig_node->router is
also NULL in batman.c:412. Now we dereference neigh_node in batman.c:420 as
third parameter of add_del_route.
I don't know if the third parameter should be set to 0 if neigh_node is NULL
or if the "if"-statement is wrong - so i will not send a patch this time.
Best regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] Possible null pointer dereference in batman's update_routes
2008-09-27 16:31 [B.A.T.M.A.N.] Possible null pointer dereference in batman's update_routes Sven Eckelmann
@ 2008-09-27 17:20 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2008-09-27 17:20 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Hi,
> I am not sure but I think it could be possible that there is a null pointer
> dereference at batman.c:420
> I assume that it is possible that neigh_node is NULL and orig_node->router
> is also NULL in batman.c:412. Now we dereference neigh_node in batman.c:420
> as third parameter of add_del_route.
> I don't know if the third parameter should be set to 0 if neigh_node is
> NULL or if the "if"-statement is wrong - so i will not send a patch this
> time.
this one is a bit tricky (may be we should add a comment there). In line 386
we prevent that null pointer dereference:
orig_node->router != neigh_node
If both variables are NULL it would fail here. :-)
Greetings,
Marek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-27 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-27 16:31 [B.A.T.M.A.N.] Possible null pointer dereference in batman's update_routes Sven Eckelmann
2008-09-27 17:20 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox