No description
Find a file
Kees Cook 4bea747f3f net/sun3_82586: Avoid reading past buffer in debug output
Since NUM_XMIT_BUFFS is always 1, building m68k with sun3_defconfig and
-Warraybounds, this build warning is visible[1]:

drivers/net/ethernet/i825xx/sun3_82586.c: In function 'sun3_82586_timeout':
drivers/net/ethernet/i825xx/sun3_82586.c:990:122: warning: array subscript 1 is above array bounds of 'volatile struct transmit_cmd_struct *[1]' [-Warray-bounds=]
  990 |                 printk("%s: command-stats: %04x %04x\n",dev->name,swab16(p->xmit_cmds[0]->cmd_status),swab16(p->xmit_cmds[1]->cmd_status));
      |                                                                                                               ~~~~~~~~~~~~^~~
...
drivers/net/ethernet/i825xx/sun3_82586.c:156:46: note: while referencing 'xmit_cmds'
  156 |         volatile struct transmit_cmd_struct *xmit_cmds[NUM_XMIT_BUFFS];

Avoid accessing index 1 since it doesn't exist.

Link: https://github.com/KSPP/linux/issues/325 [1]
Cc: Sam Creasey <sammy@sammy.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Simon Horman <horms@kernel.org> # build-tested
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20240206161651.work.876-kees@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-02-08 18:41:10 -08:00
arch Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-08 15:30:33 -08:00
block block: Fix where bio IO priority gets set 2024-02-01 11:00:06 -07:00
certs
crypto crypto: algif_hash - Remove bogus SGL free on zero-length error path 2024-02-02 18:08:12 +08:00
Documentation Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-08 15:30:33 -08:00
drivers net/sun3_82586: Avoid reading past buffer in debug output 2024-02-08 18:41:10 -08:00
fs nfsd-6.8 fixes: 2024-02-07 17:48:15 +00:00
include Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-08 15:30:33 -08:00
init Kconfig: Disable -Wstringop-overflow for GCC globally 2024-02-01 14:57:17 -08:00
io_uring io_uring/net: fix sr->len for IORING_OP_RECV with MSG_WAITALL and buffers 2024-02-01 06:42:36 -07:00
ipc shm: Slim down dependencies 2023-12-20 19:26:31 -05:00
kernel Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-08 15:30:33 -08:00
lib net: blackhole_dev: fix build warning for ethh set but not used 2024-02-05 12:30:54 +00:00
LICENSES
mm 22 hotfixes. 11 are cc:stable and the remainder address post-6.7 issues 2024-01-29 17:12:16 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-08 15:30:33 -08:00
rust rust: phy: use VTABLE_DEFAULT_ERROR 2024-01-27 14:28:00 +00:00
samples samples/cgroup: add .gitignore file for generated samples 2024-01-24 11:52:40 -08:00
scripts Kbuild fixes for v6.8 2024-02-01 11:57:42 -08:00
security Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-01 15:12:37 -08:00
sound ASoC: Fixes for v6.8 2024-02-01 19:40:42 +01:00
tools Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-08 15:30:33 -08:00
usr Kbuild updates for v6.8 2024-01-18 17:57:07 -08:00
virt Generic: 2024-01-17 13:03:37 -08:00
.clang-format
.cocciconfig
.editorconfig Add .editorconfig file for basic formatting 2023-12-28 16:22:47 +09:00
.get_maintainer.ignore
.gitattributes
.gitignore Add .editorconfig file for basic formatting 2023-12-28 16:22:47 +09:00
.mailmap mailmap: add entry for Stefan Wahren 2024-01-31 13:38:51 +00:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: supplement of zswap maintainers update 2024-01-25 23:52:21 -08:00
Kbuild
Kconfig
MAINTAINERS Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-08 15:30:33 -08:00
Makefile Linux 6.8-rc3 2024-02-04 12:20:36 +00:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.