Revision da353fac65fede6b8b4cfe207f0d9408e3121105 authored by Daniel Jordan on 27 October 2021, 21:59:20 UTC, committed by David S. Miller on 28 October 2021, 13:41:20 UTC
sk->sk_err appears to expect a positive value, a convention that ktls doesn't always follow and that leads to memory corruption in other code. For instance, [kworker] tls_encrypt_done(..., err=<negative error from crypto request>) tls_err_abort(.., err) sk->sk_err = err; [task] splice_from_pipe_feed ... tls_sw_do_sendpage if (sk->sk_err) { ret = -sk->sk_err; // ret is positive splice_from_pipe_feed (continued) ret = actor(...) // ret is still positive and interpreted as bytes // written, resulting in underflow of buf->len and // sd->len, leading to huge buf->offset and bogus // addresses computed in later calls to actor() Fix all tls_err_abort() callers to pass a negative error code consistently and centralize the error-prone sign flip there, throwing in a warning to catch future misuse and uninlining the function so it really does only warn once. Cc: stable@vger.kernel.org Fixes: c46234ebb4d1e ("tls: RX path for ktls") Reported-by: syzbot+b187b77c8474f9648fae@syzkaller.appspotmail.com Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a32f07d
File | Mode | Size |
---|---|---|
altera-stapl | ||
bcm-vk | ||
c2port | ||
cardreader | ||
cb710 | ||
cxl | ||
echo | ||
eeprom | ||
genwqe | ||
habanalabs | ||
ibmasm | ||
lis3lv02d | ||
lkdtm | ||
mei | ||
ocxl | ||
pvpanic | ||
sgi-gru | ||
sgi-xp | ||
ti-st | ||
uacce | ||
vmw_vmci | ||
Kconfig | -rw-r--r-- | 16.1 KB |
Makefile | -rw-r--r-- | 2.2 KB |
ad525x_dpot-i2c.c | -rw-r--r-- | 2.6 KB |
ad525x_dpot-spi.c | -rw-r--r-- | 2.8 KB |
ad525x_dpot.c | -rw-r--r-- | 20.2 KB |
ad525x_dpot.h | -rw-r--r-- | 7.9 KB |
apds9802als.c | -rw-r--r-- | 7.0 KB |
apds990x.c | -rw-r--r-- | 33.2 KB |
atmel-ssc.c | -rw-r--r-- | 5.9 KB |
bh1770glc.c | -rw-r--r-- | 36.8 KB |
cs5535-mfgpt.c | -rw-r--r-- | 10.0 KB |
ds1682.c | -rw-r--r-- | 7.0 KB |
dummy-irq.c | -rw-r--r-- | 1.4 KB |
dw-xdata-pcie.c | -rw-r--r-- | 9.7 KB |
enclosure.c | -rw-r--r-- | 18.3 KB |
fastrpc.c | -rw-r--r-- | 39.9 KB |
gehc-achc.c | -rw-r--r-- | 12.6 KB |
hi6421v600-irq.c | -rw-r--r-- | 7.5 KB |
hisi_hikey_usb.c | -rw-r--r-- | 7.1 KB |
hmc6352.c | -rw-r--r-- | 3.4 KB |
hpilo.c | -rw-r--r-- | 22.0 KB |
hpilo.h | -rw-r--r-- | 5.5 KB |
ibmvmc.c | -rw-r--r-- | 60.8 KB |
ibmvmc.h | -rw-r--r-- | 5.2 KB |
ics932s401.c | -rw-r--r-- | 12.6 KB |
isl29003.c | -rw-r--r-- | 10.9 KB |
isl29020.c | -rw-r--r-- | 5.0 KB |
kgdbts.c | -rw-r--r-- | 30.6 KB |
lattice-ecp3-config.c | -rw-r--r-- | 5.6 KB |
pch_phub.c | -rw-r--r-- | 27.0 KB |
pci_endpoint_test.c | -rw-r--r-- | 24.3 KB |
phantom.c | -rw-r--r-- | 13.0 KB |
qcom-coincell.c | -rw-r--r-- | 3.6 KB |
sram-exec.c | -rw-r--r-- | 3.8 KB |
sram.c | -rw-r--r-- | 11.4 KB |
sram.h | -rw-r--r-- | 1.2 KB |
tifm_7xx1.c | -rw-r--r-- | 10.7 KB |
tifm_core.c | -rw-r--r-- | 8.1 KB |
tsl2550.c | -rw-r--r-- | 10.0 KB |
vmw_balloon.c | -rw-r--r-- | 54.6 KB |
xilinx_sdfec.c | -rw-r--r-- | 38.0 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...