Revision dc24f8b4ecd3d6c4153a1ec1bc2006ab32a41b8d authored by Paolo Abeni on 26 February 2020, 11:19:03 UTC, committed by David S. Miller on 27 February 2020, 04:49:50 UTC
syzbot noted that the master MPTCP socket lacks the icsk_sync_mss
callback, and was able to trigger a null pointer dereference:

BUG: kernel NULL pointer dereference, address: 0000000000000000
PGD 8e171067 P4D 8e171067 PUD 93fa2067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8984 Comm: syz-executor066 Not tainted 5.6.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffffc900020b7b80 EFLAGS: 00010246
RAX: 1ffff110124ba600 RBX: 0000000000000000 RCX: ffff88809fefa600
RDX: ffff8880994cdb18 RSI: 0000000000000000 RDI: ffff8880925d3140
RBP: ffffc900020b7bd8 R08: ffffffff870225be R09: fffffbfff140652a
R10: fffffbfff140652a R11: 0000000000000000 R12: ffff8880925d35d0
R13: ffff8880925d3140 R14: dffffc0000000000 R15: 1ffff110124ba6ba
FS:  0000000001a0b880(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000a6d6f000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 cipso_v4_sock_setattr+0x34b/0x470 net/ipv4/cipso_ipv4.c:1888
 netlbl_sock_setattr+0x2a7/0x310 net/netlabel/netlabel_kapi.c:989
 smack_netlabel security/smack/smack_lsm.c:2425 [inline]
 smack_inode_setsecurity+0x3da/0x4a0 security/smack/smack_lsm.c:2716
 security_inode_setsecurity+0xb2/0x140 security/security.c:1364
 __vfs_setxattr_noperm+0x16f/0x3e0 fs/xattr.c:197
 vfs_setxattr fs/xattr.c:224 [inline]
 setxattr+0x335/0x430 fs/xattr.c:451
 __do_sys_fsetxattr fs/xattr.c:506 [inline]
 __se_sys_fsetxattr+0x130/0x1b0 fs/xattr.c:495
 __x64_sys_fsetxattr+0xbf/0xd0 fs/xattr.c:495
 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440199
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffcadc19e48 EFLAGS: 00000246 ORIG_RAX: 00000000000000be
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440199
RDX: 0000000020000200 RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000003 R09: 00000000004002c8
R10: 0000000000000009 R11: 0000000000000246 R12: 0000000000401a20
R13: 0000000000401ab0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
CR2: 0000000000000000

Address the issue adding a dummy icsk_sync_mss callback.
To properly sync the subflows mss and options list we need some
additional infrastructure, which will land to net-next.

Reported-by: syzbot+f4dfece964792d80b139@syzkaller.appspotmail.com
Fixes: 2303f994b3e1 ("mptcp: Associate MPTCP context with TCP socket")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4f31c53
History
File Mode Size
88pg86x.c -rw-r--r-- 2.8 KB
88pm800-regulator.c -rw-r--r-- 9.2 KB
88pm8607.c -rw-r--r-- 13.4 KB
Kconfig -rw-r--r-- 36.1 KB
Makefile -rw-r--r-- 7.3 KB
aat2870-regulator.c -rw-r--r-- 4.9 KB
ab3100.c -rw-r--r-- 17.8 KB
ab8500-ext.c -rw-r--r-- 25.8 KB
ab8500.c -rw-r--r-- 41.0 KB
act8865-regulator.c -rw-r--r-- 21.5 KB
act8945a-regulator.c -rw-r--r-- 9.2 KB
ad5398.c -rw-r--r-- 6.3 KB
anatop-regulator.c -rw-r--r-- 9.4 KB
arizona-ldo1.c -rw-r--r-- 9.9 KB
arizona-micsupp.c -rw-r--r-- 9.9 KB
as3711-regulator.c -rw-r--r-- 7.9 KB
as3722-regulator.c -rw-r--r-- 25.4 KB
axp20x-regulator.c -rw-r--r-- 47.9 KB
bcm590xx-regulator.c -rw-r--r-- 10.1 KB
bd70528-regulator.c -rw-r--r-- 8.3 KB
bd71828-regulator.c -rw-r--r-- 24.5 KB
bd718x7-regulator.c -rw-r--r-- 34.9 KB
bd9571mwv-regulator.c -rw-r--r-- 8.7 KB
core.c -rw-r--r-- 147.6 KB
cpcap-regulator.c -rw-r--r-- 18.0 KB
da903x.c -rw-r--r-- 14.7 KB
da9052-regulator.c -rw-r--r-- 12.6 KB
da9055-regulator.c -rw-r--r-- 15.4 KB
da9062-regulator.c -rw-r--r-- 33.1 KB
da9063-regulator.c -rw-r--r-- 24.7 KB
da9210-regulator.c -rw-r--r-- 6.2 KB
da9210-regulator.h -rw-r--r-- 8.1 KB
da9211-regulator.c -rw-r--r-- 13.1 KB
da9211-regulator.h -rw-r--r-- 8.1 KB
db8500-prcmu.c -rw-r--r-- 11.9 KB
dbx500-prcmu.c -rw-r--r-- 4.4 KB
dbx500-prcmu.h -rw-r--r-- 1.2 KB
devres.c -rw-r--r-- 12.9 KB
dummy.c -rw-r--r-- 2.0 KB
dummy.h -rw-r--r-- 511 bytes
fan53555.c -rw-r--r-- 13.4 KB
fixed-helper.c -rw-r--r-- 1.6 KB
fixed.c -rw-r--r-- 7.6 KB
gpio-regulator.c -rw-r--r-- 9.3 KB
helpers.c -rw-r--r-- 22.9 KB
hi6421-regulator.c -rw-r--r-- 17.8 KB
hi6421v530-regulator.c -rw-r--r-- 5.7 KB
hi655x-regulator.c -rw-r--r-- 6.8 KB
internal.h -rw-r--r-- 2.6 KB
isl6271a-regulator.c -rw-r--r-- 4.0 KB
isl9305.c -rw-r--r-- 5.0 KB
lm363x-regulator.c -rw-r--r-- 10.3 KB
lochnagar-regulator.c -rw-r--r-- 7.2 KB
lp3971.c -rw-r--r-- 11.5 KB
lp3972.c -rw-r--r-- 14.4 KB
lp872x.c -rw-r--r-- 24.8 KB
lp873x-regulator.c -rw-r--r-- 6.3 KB
lp8755.c -rw-r--r-- 13.5 KB
lp87565-regulator.c -rw-r--r-- 6.6 KB
lp8788-buck.c -rw-r--r-- 13.0 KB
lp8788-ldo.c -rw-r--r-- 16.2 KB
ltc3589.c -rw-r--r-- 12.7 KB
ltc3676.c -rw-r--r-- 11.1 KB
max14577-regulator.c -rw-r--r-- 8.1 KB
max1586.c -rw-r--r-- 7.9 KB
max77620-regulator.c -rw-r--r-- 24.5 KB
max77650-regulator.c -rw-r--r-- 12.7 KB
max77686-regulator.c -rw-r--r-- 16.3 KB
max77693-regulator.c -rw-r--r-- 8.6 KB
max77802-regulator.c -rw-r--r-- 18.3 KB
max8649.c -rw-r--r-- 6.7 KB
max8660.c -rw-r--r-- 13.1 KB
max8907-regulator.c -rw-r--r-- 10.5 KB
max8925-regulator.c -rw-r--r-- 7.9 KB
max8952.c -rw-r--r-- 8.8 KB
max8973-regulator.c -rw-r--r-- 23.0 KB
max8997-regulator.c -rw-r--r-- 31.1 KB
max8998.c -rw-r--r-- 19.4 KB
mc13783-regulator.c -rw-r--r-- 15.7 KB
mc13892-regulator.c -rw-r--r-- 20.1 KB
mc13xxx-regulator-core.c -rw-r--r-- 6.1 KB
mc13xxx.h -rw-r--r-- 3.1 KB
mcp16502.c -rw-r--r-- 13.7 KB
mp8859.c -rw-r--r-- 3.6 KB
mpq7920.c -rw-r--r-- 9.5 KB
mpq7920.h -rw-r--r-- 2.0 KB
mt6311-regulator.c -rw-r--r-- 4.1 KB
mt6311-regulator.h -rw-r--r-- 2.0 KB
mt6323-regulator.c -rw-r--r-- 12.6 KB
mt6358-regulator.c -rw-r--r-- 16.0 KB
mt6380-regulator.c -rw-r--r-- 11.6 KB
mt6397-regulator.c -rw-r--r-- 12.5 KB
of_regulator.c -rw-r--r-- 16.4 KB
palmas-regulator.c -rw-r--r-- 44.3 KB
pbias-regulator.c -rw-r--r-- 6.3 KB
pcap-regulator.c -rw-r--r-- 7.1 KB
pcf50633-regulator.c -rw-r--r-- 3.7 KB
pfuze100-regulator.c -rw-r--r-- 25.9 KB
pv88060-regulator.c -rw-r--r-- 9.8 KB
pv88060-regulator.h -rw-r--r-- 1.8 KB
pv88080-regulator.c -rw-r--r-- 16.1 KB
pv88080-regulator.h -rw-r--r-- 3.4 KB
pv88090-regulator.c -rw-r--r-- 10.4 KB
pv88090-regulator.h -rw-r--r-- 2.7 KB
pwm-regulator.c -rw-r--r-- 10.5 KB
qcom-rpmh-regulator.c -rw-r--r-- 33.4 KB
qcom_rpm-regulator.c -rw-r--r-- 29.0 KB
qcom_smd-regulator.c -rw-r--r-- 32.6 KB
qcom_spmi-regulator.c -rw-r--r-- 65.8 KB
rc5t583-regulator.c -rw-r--r-- 5.4 KB
rk808-regulator.c -rw-r--r-- 43.0 KB
rn5t618-regulator.c -rw-r--r-- 5.4 KB
rohm-regulator.c -rw-r--r-- 2.3 KB
rt5033-regulator.c -rw-r--r-- 3.6 KB
s2mpa01.c -rw-r--r-- 10.6 KB
s2mps11.c -rw-r--r-- 41.6 KB
s5m8767.c -rw-r--r-- 26.1 KB
sc2731-regulator.c -rw-r--r-- 8.3 KB
sky81452-regulator.c -rw-r--r-- 2.5 KB
slg51000-regulator.c -rw-r--r-- 16.9 KB
slg51000-regulator.h -rw-r--r-- 23.3 KB
stm32-booster.c -rw-r--r-- 3.5 KB
stm32-pwr.c -rw-r--r-- 4.4 KB
stm32-vrefbuf.c -rw-r--r-- 7.6 KB
stpmic1_regulator.c -rw-r--r-- 17.4 KB
stw481x-vmmc.c -rw-r--r-- 2.7 KB
sy8106a-regulator.c -rw-r--r-- 4.0 KB
sy8824x.c -rw-r--r-- 5.4 KB
ti-abb-regulator.c -rw-r--r-- 24.1 KB
tps51632-regulator.c -rw-r--r-- 10.3 KB
tps6105x-regulator.c -rw-r--r-- 3.2 KB
tps62360-regulator.c -rw-r--r-- 14.3 KB
tps65023-regulator.c -rw-r--r-- 10.5 KB
tps6507x-regulator.c -rw-r--r-- 11.3 KB
tps65086-regulator.c -rw-r--r-- 8.0 KB
tps65090-regulator.c -rw-r--r-- 14.4 KB
tps65132-regulator.c -rw-r--r-- 7.7 KB
tps65217-regulator.c -rw-r--r-- 9.1 KB
tps65218-regulator.c -rw-r--r-- 11.9 KB
tps6524x-regulator.c -rw-r--r-- 14.7 KB
tps6586x-regulator.c -rw-r--r-- 15.7 KB
tps65910-regulator.c -rw-r--r-- 32.9 KB
tps65912-regulator.c -rw-r--r-- 5.7 KB
tps80031-regulator.c -rw-r--r-- 20.3 KB
twl-regulator.c -rw-r--r-- 18.3 KB
twl6030-regulator.c -rw-r--r-- 19.6 KB
uniphier-regulator.c -rw-r--r-- 5.6 KB
userspace-consumer.c -rw-r--r-- 4.2 KB
vctrl-regulator.c -rw-r--r-- 13.1 KB
vexpress-regulator.c -rw-r--r-- 2.6 KB
virtual.c -rw-r--r-- 8.2 KB
vqmmc-ipq4019-regulator.c -rw-r--r-- 2.7 KB
wm831x-dcdc.c -rw-r--r-- 21.7 KB
wm831x-isink.c -rw-r--r-- 5.2 KB
wm831x-ldo.c -rw-r--r-- 16.5 KB
wm8350-regulator.c -rw-r--r-- 32.8 KB
wm8400-regulator.c -rw-r--r-- 7.7 KB
wm8994-regulator.c -rw-r--r-- 5.1 KB

back to top