<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/batman-adv/icmp_socket.c, branch v3.3-rc2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>batman-adv: Only write requested number of byte to user buffer</title>
<updated>2011-12-12T11:11:07+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2011-12-10T14:28:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b5a1eeef04cc7859f34dec9b72ea1b28e4aba07c'/>
<id>b5a1eeef04cc7859f34dec9b72ea1b28e4aba07c</id>
<content type='text'>
Don't write more than the requested number of bytes of an batman-adv icmp
packet to the userspace buffer. Otherwise unrelated userspace memory might get
overridden by the kernel.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't write more than the requested number of bytes of an batman-adv icmp
packet to the userspace buffer. Otherwise unrelated userspace memory might get
overridden by the kernel.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: Directly check read of icmp packet in copy_from_user</title>
<updated>2011-12-12T11:11:06+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2011-12-10T14:28:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d18eb45332478f319e5cf996e093228a68864cce'/>
<id>d18eb45332478f319e5cf996e093228a68864cce</id>
<content type='text'>
The access_ok read check can be directly done in copy_from_user since a failure
of access_ok is handled the same way as an error in __copy_from_user.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The access_ok read check can be directly done in copy_from_user since a failure
of access_ok is handled the same way as an error in __copy_from_user.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: bat_socket_read missing checks</title>
<updated>2011-12-12T11:11:06+00:00</updated>
<author>
<name>Paul Kot</name>
<email>pawlkt@gmail.com</email>
</author>
<published>2011-12-10T14:28:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c00b6856fc642b234895cfabd15b289e76726430'/>
<id>c00b6856fc642b234895cfabd15b289e76726430</id>
<content type='text'>
Writing a icmp_packet_rr and then reading icmp_packet can lead to kernel
memory corruption, if __user *buf is just below TASK_SIZE.

Signed-off-by: Paul Kot &lt;pawlkt@gmail.com&gt;
[sven@narfation.org: made it checkpatch clean]
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Writing a icmp_packet_rr and then reading icmp_packet can lead to kernel
memory corruption, if __user *buf is just below TASK_SIZE.

Signed-off-by: Paul Kot &lt;pawlkt@gmail.com&gt;
[sven@narfation.org: made it checkpatch clean]
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: report compat_version in version field in case of version mismatch</title>
<updated>2011-11-20T12:08:35+00:00</updated>
<author>
<name>Marek Lindner</name>
<email>lindner_marek@yahoo.de</email>
</author>
<published>2011-10-30T21:10:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ad24431277fc92717084d5b4c451e15982588206'/>
<id>ad24431277fc92717084d5b4c451e15982588206</id>
<content type='text'>
Reported-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: Calculate sizeof using variable insead of types</title>
<updated>2011-05-30T05:39:33+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2011-05-14T21:14:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=704509b8d44886cebfbaff1a9813c35dfa986954'/>
<id>704509b8d44886cebfbaff1a9813c35dfa986954</id>
<content type='text'>
Documentation/CodingStyle recommends to use the form

	p = kmalloc(sizeof(*p), ...);

to calculate the size of a struct and not the version where the struct
name is spelled out to prevent bugs when the type of p changes. This
also seems appropriate for manipulation of buffers when they are
directly associated with p.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Documentation/CodingStyle recommends to use the form

	p = kmalloc(sizeof(*p), ...);

to calculate the size of a struct and not the version where the struct
name is spelled out to prevent bugs when the type of p changes. This
also seems appropriate for manipulation of buffers when they are
directly associated with p.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: Make bat_priv-&gt;primary_if an rcu protected pointer</title>
<updated>2011-05-01T20:49:03+00:00</updated>
<author>
<name>Marek Lindner</name>
<email>lindner_marek@yahoo.de</email>
</author>
<published>2011-04-20T13:40:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=32ae9b221e788413ce68feaae2ca39e406211a0a'/>
<id>32ae9b221e788413ce68feaae2ca39e406211a0a</id>
<content type='text'>
The rcu protected macros rcu_dereference() and rcu_assign_pointer()
for the bat_priv-&gt;primary_if need to be used, as well as spin/rcu locking.

Otherwise we might end up using a primary_if pointer pointing to already
freed memory.

Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The rcu protected macros rcu_dereference() and rcu_assign_pointer()
for the bat_priv-&gt;primary_if need to be used, as well as spin/rcu locking.

Otherwise we might end up using a primary_if pointer pointing to already
freed memory.

Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: Make orig_node-&gt;router an rcu protected pointer</title>
<updated>2011-04-17T19:11:01+00:00</updated>
<author>
<name>Linus Lüssing</name>
<email>linus.luessing@web.de</email>
</author>
<published>2011-03-14T22:43:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e1a5382f978b67b5cc36eec65e6046730ce07714'/>
<id>e1a5382f978b67b5cc36eec65e6046730ce07714</id>
<content type='text'>
The rcu protected macros rcu_dereference() and rcu_assign_pointer()
for the orig_node-&gt;router need to be used, as well as spin/rcu locking.
Otherwise we might end up using a router pointer pointing to already
freed memory.

Therefore this commit introduces the safe getter method
orig_node_get_router().

Signed-off-by: Linus Lüssing &lt;linus.luessing@web.de&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The rcu protected macros rcu_dereference() and rcu_assign_pointer()
for the orig_node-&gt;router need to be used, as well as spin/rcu locking.
Otherwise we might end up using a router pointer pointing to already
freed memory.

Therefore this commit introduces the safe getter method
orig_node_get_router().

Signed-off-by: Linus Lüssing &lt;linus.luessing@web.de&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: remove orig_hash spinlock</title>
<updated>2011-03-05T11:52:04+00:00</updated>
<author>
<name>Marek Lindner</name>
<email>lindner_marek@yahoo.de</email>
</author>
<published>2011-01-19T20:01:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d0072609baebaffb522083d367f4f195187f60f8'/>
<id>d0072609baebaffb522083d367f4f195187f60f8</id>
<content type='text'>
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: Correct rcu refcounting for orig_node</title>
<updated>2011-03-05T11:52:01+00:00</updated>
<author>
<name>Marek Lindner</name>
<email>lindner_marek@yahoo.de</email>
</author>
<published>2011-02-18T12:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7b36e8eef989fc59535b4f1d3fc0f83afaf419d4'/>
<id>7b36e8eef989fc59535b4f1d3fc0f83afaf419d4</id>
<content type='text'>
It might be possible that 2 threads access the same data in the same
rcu grace period. The first thread calls call_rcu() to decrement the
refcount and free the data while the second thread increases the
refcount to use the data. To avoid this race condition all refcount
operations have to be atomic.

Reported-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It might be possible that 2 threads access the same data in the same
rcu grace period. The first thread calls call_rcu() to decrement the
refcount and free the data while the second thread increases the
refcount to use the data. To avoid this race condition all refcount
operations have to be atomic.

Reported-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>batman-adv: remove extra layer between hash and hash element - hash bucket</title>
<updated>2011-03-05T11:52:00+00:00</updated>
<author>
<name>Marek Lindner</name>
<email>lindner_marek@yahoo.de</email>
</author>
<published>2011-02-18T12:28:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7aadf889e897155c45cda230d2a6701ad1fbff61'/>
<id>7aadf889e897155c45cda230d2a6701ad1fbff61</id>
<content type='text'>
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Marek Lindner &lt;lindner_marek@yahoo.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
