<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/wan, branch v4.4.8</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.8</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.8'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-04-20T06:42:03+00:00</updated>
<entry>
<title>farsync: fix off-by-one bug in fst_add_one</title>
<updated>2016-04-20T06:42:03+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-03-14T14:18:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e6ede49a9bdc8e6762216fe1760c4183791676c'/>
<id>urn:sha1:6e6ede49a9bdc8e6762216fe1760c4183791676c</id>
<content type='text'>
[ Upstream commit e725a66c0202b5f36c2f9d59d26a65c53bbf21f7 ]

gcc-6 finds an out of bounds access in the fst_add_one function
when calculating the end of the mmio area:

drivers/net/wan/farsync.c: In function 'fst_add_one':
drivers/net/wan/farsync.c:418:53: error: index 2 denotes an offset greater than size of 'u8[2][8192] {aka unsigned char[2][8192]}' [-Werror=array-bounds]
 #define BUF_OFFSET(X)   (BFM_BASE + offsetof(struct buf_window, X))
                                                     ^
include/linux/compiler-gcc.h:158:21: note: in definition of macro '__compiler_offsetof'
  __builtin_offsetof(a, b)
                     ^
drivers/net/wan/farsync.c:418:37: note: in expansion of macro 'offsetof'
 #define BUF_OFFSET(X)   (BFM_BASE + offsetof(struct buf_window, X))
                                     ^~~~~~~~
drivers/net/wan/farsync.c:2519:36: note: in expansion of macro 'BUF_OFFSET'
                                  + BUF_OFFSET ( txBuffer[i][NUM_TX_BUFFER][0]);
                                    ^~~~~~~~~~

The warning is correct, but not critical because this appears
to be a write-only variable that is set by each WAN driver but
never accessed afterwards.

I'm taking the minimal fix here, using the correct pointer by
pointing 'mem_end' to the last byte inside of the register area
as all other WAN drivers do, rather than the first byte outside of
it. An alternative would be to just remove the mem_end member
entirely.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wan/x25: Fix use-after-free in x25_asy_open_tty()</title>
<updated>2015-12-01T20:17:42+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2015-11-27T19:18:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ee9159ddce14bc1dec9435ae4e3bd3153e783706'/>
<id>urn:sha1:ee9159ddce14bc1dec9435ae4e3bd3153e783706</id>
<content type='text'>
The N_X25 line discipline may access the previous line discipline's closed
and already-freed private data on open [1].

The tty-&gt;disc_data field _never_ refers to valid data on entry to the
line discipline's open() method. Rather, the ldisc is expected to
initialize that field for its own use for the lifetime of the instance
(ie. from open() to close() only).

[1]
    [  634.336761] ==================================================================
    [  634.338226] BUG: KASAN: use-after-free in x25_asy_open_tty+0x13d/0x490 at addr ffff8800a743efd0
    [  634.339558] Read of size 4 by task syzkaller_execu/8981
    [  634.340359] =============================================================================
    [  634.341598] BUG kmalloc-512 (Not tainted): kasan: bad access detected
    ...
    [  634.405018] Call Trace:
    [  634.405277] dump_stack (lib/dump_stack.c:52)
    [  634.405775] print_trailer (mm/slub.c:655)
    [  634.406361] object_err (mm/slub.c:662)
    [  634.406824] kasan_report_error (mm/kasan/report.c:138 mm/kasan/report.c:236)
    [  634.409581] __asan_report_load4_noabort (mm/kasan/report.c:279)
    [  634.411355] x25_asy_open_tty (drivers/net/wan/x25_asy.c:559 (discriminator 1))
    [  634.413997] tty_ldisc_open.isra.2 (drivers/tty/tty_ldisc.c:447)
    [  634.414549] tty_set_ldisc (drivers/tty/tty_ldisc.c:567)
    [  634.415057] tty_ioctl (drivers/tty/tty_io.c:2646 drivers/tty/tty_io.c:2879)
    [  634.423524] do_vfs_ioctl (fs/ioctl.c:43 fs/ioctl.c:607)
    [  634.427491] SyS_ioctl (fs/ioctl.c:622 fs/ioctl.c:613)
    [  634.427945] entry_SYSCALL_64_fastpath (arch/x86/entry/entry_64.S:188)

Reported-and-tested-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>hdlc: fix null-deref on allocation failure</title>
<updated>2015-11-18T19:58:03+00:00</updated>
<author>
<name>stephen hemminger</name>
<email>shemming@brocade.com</email>
</author>
<published>2015-11-17T22:26:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52d178516dcf61e7a59363a572458c830af6e520'/>
<id>urn:sha1:52d178516dcf61e7a59363a572458c830af6e520</id>
<content type='text'>
If alloc_netdev() failed and return NULL, then the next instruction
would dereference it. Found by Coverity.

Compile tested only. Not sure if anyone still uses this driver
(or the whole WAN subsystem).

Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: wan: sbni: fix device usage count</title>
<updated>2015-09-06T00:32:53+00:00</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2015-09-03T06:00:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd516bd1feeb3890502178a74228ec05271f2b6d'/>
<id>urn:sha1:bd516bd1feeb3890502178a74228ec05271f2b6d</id>
<content type='text'>
dev_get_by_name() will increment the usage count if the matching device
is found. But we were not decrementing the count if we have got the
device and the device is non-active.

Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: caif: convert to using IFF_NO_QUEUE</title>
<updated>2015-08-18T18:55:07+00:00</updated>
<author>
<name>Phil Sutter</name>
<email>phil@nwl.cc</email>
</author>
<published>2015-08-18T08:30:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4676a15207e3bc5e18b7e39b934ce0e890ee54fe'/>
<id>urn:sha1:4676a15207e3bc5e18b7e39b934ce0e890ee54fe</id>
<content type='text'>
Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Cc: Dmitry Tarnyagin &lt;dmitry.tarnyagin@lockless.no&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>cosa: missing error code on failure in probe()</title>
<updated>2015-08-12T23:53:11+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2015-08-12T21:08:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e6d006938c9bda7ffd22af9d3e1257fd75941fb7'/>
<id>urn:sha1:e6d006938c9bda7ffd22af9d3e1257fd75941fb7</id>
<content type='text'>
If register_hdlc_device() fails, the current code returns 0 but we
should return an error code instead.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Doc: z8530book: Fix typo in API-z8530-sync-txdma-open.html</title>
<updated>2015-07-11T06:45:31+00:00</updated>
<author>
<name>Masanari Iida</name>
<email>standby24x7@gmail.com</email>
</author>
<published>2015-07-10T12:20:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=145c37084e3e6584b95f82361922965cc3af41bf'/>
<id>urn:sha1:145c37084e3e6584b95f82361922965cc3af41bf</id>
<content type='text'>
This patch fix a spelling typo found in API-z8530-sync-txdma-open.html.
It is because this file was generated from comment in source,
I have to fix comment in source.

Signed-off-by: Masanari Iida &lt;standby24x7@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: Remove spurios included of netfilter.h</title>
<updated>2015-06-18T19:14:32+00:00</updated>
<author>
<name>Eric W Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-06-17T15:28:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8f481b50ea653ff0aea6accbb4bb02a15cf00531'/>
<id>urn:sha1:8f481b50ea653ff0aea6accbb4bb02a15cf00531</id>
<content type='text'>
While testing my netfilter changes I noticed several files where
recompiling unncessarily because they unncessarily included
netfilter.h.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>wan: dscc4: use msecs_to_jiffies for conversions</title>
<updated>2015-06-08T06:45:39+00:00</updated>
<author>
<name>Nicholas Mc Guire</name>
<email>hofrat@osadl.org</email>
</author>
<published>2015-06-07T10:35:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cbab1510afbb140f7a51d996eafc525ac316c667'/>
<id>urn:sha1:cbab1510afbb140f7a51d996eafc525ac316c667</id>
<content type='text'>
API compliance scanning with coccinelle flagged:
./drivers/net/wan/dscc4.c:1036:1-33:
        WARNING: timeout (10) seems HZ dependent
./drivers/net/wan/dscc4.c:554:2-34:
        WARNING: timeout (10) seems HZ dependent
./drivers/net/wan/dscc4.c:599:2-34:
        WARNING: timeout (10) seems HZ dependent

Numeric constants passed to schedule_timeout_*() make the effective
timeout HZ dependent which does not seem to be the intent here.
Fixed up by converting the constant to jiffies with msecs_to_jiffies(),
passing 100ms (assuming HZ==100 in the original code).

Signed-off-by: Nicholas Mc Guire &lt;hofrat@osadl.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>cosa: use msecs_to_jiffies for conversions</title>
<updated>2015-06-08T06:45:39+00:00</updated>
<author>
<name>Nicholas Mc Guire</name>
<email>hofrat@osadl.org</email>
</author>
<published>2015-06-06T07:51:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fb79c066bce8620fae04112b33c55f279b60d3e1'/>
<id>urn:sha1:fb79c066bce8620fae04112b33c55f279b60d3e1</id>
<content type='text'>
API compliance scanning with coccinelle flagged:
./drivers/net/wan/cosa.c:520:2-18: WARNING:
	timeout (30) seems HZ dependent

Numeric constants passed to schedule_timeout() make the effective
timeout HZ dependent which makes little sense in a device probe.
Fixed up by converting the constant to jiffies with msecs_to_jiffies()

Signed-off-by: Nicholas Mc Guire &lt;hofrat@osadl.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
