Skip to content

Make the kernel less awful #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 424 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
424 commits
Select commit Hold shift + click to select a range
bbd9653
rtlwifi: Fix potential overflow on P2P code
labbott Oct 18, 2019
dee743c
media: vivid: Fix wrong locking that causes race conditions on stream…
a13xp0p0v Nov 3, 2019
c64f1ae
net: qlogic: Fix memory leak in ql_alloc_large_buffers
Navidem Oct 4, 2019
1387d6b
wimax: i2400: fix memory leak
Navidem Sep 10, 2019
f1785b4
wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle
Navidem Oct 26, 2019
b8f2dd0
can: gs_usb: gs_can_open(): prevent memory leak
Navidem Sep 20, 2019
90b406a
media: rc: prevent memory leak in cx23888_ir_probe
Navidem Sep 25, 2019
2527d28
mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf
Navidem Oct 4, 2019
d33cdb0
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring
Navidem Oct 4, 2019
d85ee87
iio: imu: adis16400: release allocated memory on failure
Navidem Mar 13, 2021
46ebd54
iio: imu: adis16400: fix memory leak
Navidem Mar 13, 2021
bb07269
crypto: user - fix memory leak in crypto_report
Navidem Oct 4, 2019
921b96e
rtlwifi: prevent memory leak in rtl_usb_probe
Navidem Sep 25, 2019
22d016b
scsi: bfa: release allocated memory in case of error
Navidem Sep 10, 2019
915e7a1
ath9k_htc: release allocated buffer if timed out
Navidem Sep 6, 2019
48ee755
ath9k: release allocated buffer if timed out
Navidem Sep 6, 2019
c060e39
appletalk: Fix potential NULL pointer dereference in unregister_snap_…
Mar 14, 2019
c4b583c
Btrfs: fix selftests failure due to uninitialized i_mode in test inodes
fdmanana Sep 18, 2019
d91a581
KVM: x86: fix out-of-bounds write in KVM_GET_EMULATED_CPUID (CVE-2019…
bonzini Dec 4, 2019
9529654
ext4: work around deleting a file with i_nlink == 0 safely
tytso Nov 12, 2019
723d087
btrfs: only search for left_info if there is no right_info in try_mer…
josefbacik Jul 27, 2020
26d58e7
Input: ff-memless - kill timer in destroy()
oneukum Nov 15, 2019
43d386d
HID: hiddev: do cleanup in failure of opening a device
Aug 6, 2019
5be6a4c
HID: hiddev: avoid opening a disconnected device
Aug 6, 2019
3270058
usb: iowarrior: fix deadlock on disconnect
oneukum Aug 8, 2019
bf90299
USB: iowarrior: fix use-after-free on disconnect
jhovold Oct 9, 2019
4400a0a
usb: cdc-acm: make sure a refcount is taken early enough
oneukum Aug 8, 2019
d62b2e9
usb: yurex: Fix use-after-free in yurex_delete
Aug 5, 2019
6a3ee0f
HID: Fix assumption that devices have inputs
AlanStern Oct 3, 2019
a542bbf
media: ttusb-dec: Fix info-leak in ttusb_dec_send_command()
Sep 22, 2019
93083f5
can: peak_usb: fix slab info leak
jhovold Oct 23, 2019
cb4d263
can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices
Jul 31, 2019
546e7a2
USB: core: Fix races in character device registration and deregistraion
AlanStern Aug 12, 2019
3582035
btrfs: inode: Verify inode mode to avoid NULL pointer dereference
adam900710 Mar 13, 2019
bd1910d
f2fs: fix to do sanity check on valid block count of segment
chaseyu Apr 15, 2019
d91a14a
can: kvaser_usb: kvaser_usb_leaf: Fix some info-leaks to USB devices
Dec 7, 2019
76a978b
scsi: libsas: stop discovering if oob mode is disconnected
JasonYanHw Dec 6, 2019
72262ab
media: cpia2: Fix use-after-free in cpia2_exit
Mar 6, 2019
ed66b5b
dccp: Fix memleak in __feat_register_sp
Apr 1, 2019
1656ae6
Input: add safety guards to input_set_keycode()
dtor Dec 13, 2019
cfcd24a
media: go7007: fix a miss of snd_card_free
WillLester Dec 10, 2019
1e93cd8
af_packet: set defaule value for tmo
Dec 9, 2019
32194b0
xfrm: clean up xfrm protocol checks
congwang Mar 22, 2019
89dae5f
staging: android: ashmem: Disallow ashmem memory from being remapped
surenbaghdasaryan Jan 27, 2020
4b9ccd2
selinux: properly handle multiple messages in selinux_netlink_send()
pcmoore Apr 28, 2020
3031d0b
media: uvcvideo: Avoid cyclic entity chains due to malformed USB desc…
willdeacon Nov 8, 2019
25bd779
binder: fix UAF when releasing todo list
toddkjos Jul 21, 2020
da2226d
l2tp: fix race between l2tp_session_delete() and l2tp_tunnel_closeall()
Apr 2, 2020
9adf24e
HID: hid-input: clear unmapped usages
dtor Dec 7, 2019
f6fc932
audit: fix error handling in audit_data_to_entry()
pcmoore Feb 23, 2020
25fa90d
HID: core: Sanitize event code and type when mapping input
Sep 1, 2020
84d4919
epoll: Keep a reference on files added to the check list
Aug 19, 2020
7ab76ca
msm: kgsl: Fix race condition between cmdbatch and context destroy
Jul 26, 2019
f30ea1a
msm: vidc: remove additional checks in response_handler
Dec 13, 2019
4178c1b
vgacon: Fix a UAF in vgacon_invert_region
z00467499 Mar 4, 2020
83b8380
vt: selection, close sel_buffer race
Feb 10, 2020
03cb4d0
vt: selection, push console lock down
Feb 28, 2020
4d8c07e
vt: selection, push sel_lock up
Feb 28, 2020
fe56c0f
powercap: restrict energy meter to root access
lenb Nov 10, 2020
4913f9b
floppy: check FDC index for errors before assigning it
torvalds Feb 21, 2020
37958e2
netlabel: cope with NULL catmap
May 12, 2020
ebd2e68
net-gro: fix use-after-free read in napi_gro_frags()
edumazet May 29, 2019
b5e5daa
fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info()
ramosian-glider May 28, 2020
3953097
s390/cmm: fix information leak in cmm_timeout_handler()
RetSpill Oct 25, 2019
bf751d4
vhost: Check docket sk_family instead of call getname
eugpermar Mar 5, 2020
2483d77
diag: Prevent resource leakage of task structure
Mar 18, 2020
63956ad
msm: kgsl: Correctly clean up dma buffer attachment in case of error
Aug 19, 2020
2da0c9e
msm: kgsl: skip if requested address doesn't fall in the svm range
Aug 20, 2020
51857f4
crypto: Fix possible stack out of bound error
Aug 10, 2020
4f29aeb
crypto: Fix possible stack out of bound error
Oct 5, 2020
1d18d05
msm: kgsl: Remove VM_MAYWRITE flag to restrict mprotect
Aug 11, 2020
06e2ee7
usb: dwc3: ep0: Return from handle_status if ep0_delegate_req succeeds
Sep 16, 2020
b4b043b
msm: kgsl: Don't allow re-importing memory owned by KGSL
Sep 24, 2020
044574b
slcan: Don't transmit uninitialized stack data in padding
Apr 1, 2020
52306b1
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
rddunlap Apr 2, 2020
21cf4aa
media: ov519: add missing endpoint sanity checks
jhovold Jan 3, 2020
3b34f27
media: stv06xx: add missing descriptor sanity checks
jhovold Jan 3, 2020
179ea5f
media: xirlink_cit: add missing descriptor sanity checks
jhovold Jan 3, 2020
629fc5d
Bluetooth: A2MP: Fix not initializing all members
Vudentz Aug 6, 2020
4f4b7a4
Bluetooth: A2MP: Fix not setting request ID
Vudentz Oct 16, 2020
b2a1f8e
scsi: mptfusion: Fix double fetch bug in ioctl
Jan 14, 2020
d8d8b41
mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv()
Jan 2, 2020
0777372
mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status()
Jan 2, 2020
7c9c955
sunrpc: svcauth_gss_register_pseudoflavor must reject duplicate regis…
neilbrown May 22, 2020
548bd54
sunrpc: clean up properly in gss_mech_unregister()
neilbrown May 22, 2020
303e70a
scsi: sg: add sg_remove_request in sg_write
Apr 14, 2020
6286102
bcache: fix potential deadlock problem in btree_gc_coalesce
ZhiqiangLiu26 Jun 14, 2020
1d30217
signal: Extend exec_id to 64bits
ebiederm Mar 31, 2020
615b4c4
USB: gadget: fix illegal array access in binding with UDC
kt0755 May 10, 2020
b0dc74c
vt: keyboard: avoid signed integer overflow in k_ascii
dtor May 25, 2020
09e0f2c
netfilter: nf_conntrack_h323: lost .data_len definition for Q.931/ipv6
vaverin Jun 9, 2020
a1c9819
ext4: fix potential negative array index in do_split()
Jun 17, 2020
cacc5ea
vgacon: Fix for missing check in scrollback handling
Jul 28, 2020
287d9c7
perf/core: Fix race in the perf_mmap_close() function
Sep 16, 2020
69764f9
net/packet: fix overflow in tpacket_rcv
Sep 4, 2020
10c8786
fbcon: remove soft scrollback code
torvalds Sep 7, 2020
4447145
can, slip: Protect tty->disc_data in write_wakeup and close with RCU
Jan 21, 2020
bd9afc3
usb: usbtest: fix missing kfree(dev->buf) in usbtest_disconnect
Zqiang1211 Jun 12, 2020
73f3181
block: Fix use-after-free in blkdev_get()
JasonYanHw Jun 16, 2020
bef9738
dccp: don't duplicate ccid when cloning dccp sock
Sep 8, 2021
4913b85
Revert "dccp: don't free ccid2_hc_tx_sock struct in dccp_disconnect()"
Oct 13, 2020
c5cf7e2
cfg80211: mitigate A-MSDU aggregation attacks
vanhoefm May 31, 2021
7bcbde0
mac80211: drop A-MSDUs on old ciphers
jmberg-intel May 31, 2021
867186a
netfilter: ctnetlink: add a range check for l3/l4 protonum
Aug 24, 2020
7e9af06
nfs: Fix getxattr kernel panic and memory overflow
JeffreyMitchellSL Aug 5, 2020
7acb8d9
rbd: require global CAP_SYS_ADMIN for mapping and unmapping
idryomov Sep 3, 2020
ce130e1
mm/hugetlb: fix a race between hugetlb sysctl handlers
Sep 4, 2020
198dd41
hdlc_ppp: add range checks in ppp_cp_parse_cr()
Sep 9, 2020
34251c8
tty: make FONTX ioctl use the tty pointer they were actually passed
torvalds Oct 26, 2020
e38f8ff
Input: sunkbd - avoid use-after-free in teardown paths
dtor Oct 26, 2020
30f5af0
nfc: fix refcount leak in llcp_sock_connect()
nixiaoming Mar 25, 2021
c994523
nfc: fix memory leak in llcp_sock_connect()
nixiaoming Mar 25, 2021
e8f8848
nfc: Avoid endless loops caused by repeated llcp_sock_connect()
nixiaoming Mar 25, 2021
308dbc7
net/nfc/rawsock.c: add CAP_NET_RAW check.
Lqingyu Aug 10, 2020
3e30a0d
mac80211: do not accept/forward invalid EAPOL frames
jmberg-intel May 31, 2021
dd8c145
mac80211: assure all fragments are encrypted
vanhoefm May 31, 2021
1ff8ab3
xfrm: policy: Fix doulbe free in xfrm_policy_timer
Mar 23, 2020
44cf1f0
cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE
Feb 13, 2020
5fd161c
xen/events: avoid removing an event channel while handling it
jgross1 Nov 3, 2020
1a31484
jfs: Fix array index bounds check in dbAdjTree
kleikamp Nov 13, 2020
306b811
tracing: Fix race in trace_open and buffer resize call
Oct 6, 2020
2d398d5
vgacon: remove software scrollback support
torvalds Sep 9, 2020
5224f53
fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h
peilin-ye Sep 24, 2020
060a79c
Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts
peilin-ye Sep 24, 2020
b5eb97b
fbcon: Fix global-out-of-bounds read in fbcon_get_font()
peilin-ye Sep 24, 2020
88767e5
vt: Disable KD_FONT_OP_COPY
danvet Nov 8, 2020
919c471
romfs: fix uninitialized memory leak in romfs_dev_read()
thejh Aug 21, 2020
0a7271c
xenbus/xenbus_backend: Disallow pending watch messages
sj-aws Dec 14, 2020
13500bc
tty: Fix ->pgrp locking in tiocspgrp()
thejh Dec 3, 2020
87365e5
fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent
Eddy0402 Nov 7, 2020
28d33f8
net/x25: prevent a couple of overflows
Dec 1, 2020
ee768fd
mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_s…
Dec 6, 2020
a8dec1d
KVM: fix memory leak in kvm_io_bus_unregister_dev()
rustylife Sep 7, 2020
3e6e0fa
vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
ebiggers Mar 22, 2020
47d065c
ANDROID: xt_qtaguid: Remove tag_entry from process list on untag
Jan 11, 2021
f8446a6
HID: make arrays usage and value to be the same
Dec 5, 2020
63a8164
af_key: pfkey_dump needs parameter validation
salyzyn Jul 22, 2020
291de93
af_unix: fix garbage collect vs MSG_PEEK
Jul 28, 2021
9e3fd44
ANDROID: xt_quota2: remove trailing junk which might have a digit in it
samliddicott Jan 7, 2014
52b2505
msm: ipa2: Add check to validate rule_cnt
Dec 7, 2020
2a5e4c9
nfsd4: readdirplus shouldn't return parent of export
Jan 11, 2021
4bd15b4
ext4: handle error of ext4_setup_system_zone() on remount
jankara Mar 17, 2021
01a8d49
firewire: nosy: Fix a use-after-free bug in nosy_ioctl()
ZheyuMa Apr 3, 2021
c2a3714
Bluetooth: fix the erroneous flush_work() order
f0rm2l1n May 25, 2021
aaa04e7
Bluetooth: use correct lock to prevent UAF of hdev object
f0rm2l1n May 30, 2021
9f15817
can: bcm: delay release of struct bcm_op after synchronize_rcu()
Jun 19, 2021
184c6b5
Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl
avlarkin Jul 5, 2021
747e600
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-…
Aug 16, 2021
0840839
sctp: add size validation when walking chunks
marceloleitner Jun 28, 2021
38b2942
sctp: validate chunk size in __rcv_asconf_lookup
marceloleitner Jun 28, 2021
192ffa3
sctp: add param size validation for SCTP_PARAM_SET_PRIMARY
marceloleitner Jun 28, 2021
eab035c
net: mac802154: Fix general protection fault
pskrgag Mar 4, 2021
1081733
net_sched: cls_route: remove the right filter from hashtable
congwang Mar 14, 2020
d40af3c
ovl: prevent private clone if bind mount is not allowed
Aug 9, 2021
7a5f5c0
vt_kdsetmode: extend console locking
torvalds Aug 30, 2021
e11b8c1
sctp: use init_tag from inithdr for ABORT chunk
lxin Oct 20, 2021
48cac69
sctp: add vtag check in sctp_sf_violation
lxin Oct 20, 2021
3f70373
isdn: cpai: check ctr->cnr to avoid array index out of bound
Oct 8, 2021
bef2847
hugetlbfs: flush TLBs correctly after huge_pmd_unshare
anadav Nov 21, 2021
cd36e68
exec: Force single empty string when argv is empty
kees Feb 1, 2022
c62d0e1
drm/ttm/nouveau: don't call tt destroy callback on alloc failure.
airlied Jul 28, 2020
c82785d
UPSTREAM: ovl: fix missing negative dentry check in ovl_rename()
z00448126 Sep 24, 2021
4a36e0a
ARM: ensure the signal page contains defined contents
Jan 29, 2021
92b945b
net/sctp: fix race condition in sctp_destroy_sock
Apr 13, 2021
83e4be2
Revert "net/sctp: fix race condition in sctp_destroy_sock"
lxin May 2, 2021
416f29e
sctp: delay auto_asconf init until binding the first addr
lxin May 2, 2021
7a17ea3
xen-blkback: fix error handling in xen_blkbk_map()
jbeulich Feb 15, 2021
7299917
scsi: iscsi: Restrict sessions and handles to admin capabilities
gonzoleeman Feb 23, 2021
13c6621
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
cleech Feb 24, 2021
917ad91
scsi: iscsi: Verify lengths on passthrough PDUs
cleech Feb 24, 2021
42868ce
staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()
Mar 5, 2021
0052033
xen-blkback: don't leak persistent grants from xen_blkbk_map()
jbeulich Mar 26, 2021
aa9d6ab
xen/console: harden hvc_xen against event channel storms
jgross1 Dec 16, 2021
42b92e8
xen/netback: don't queue unlimited number of packages
jgross1 Nov 30, 2021
6cf3650
btrfs: fix race when cloning extent buffer during rewind of an old root
fdmanana Mar 11, 2021
f6f68db
PCI: rpadlpar: Fix potential drc_name corruption in store functions
tyreld Mar 15, 2021
7787a4b
bpf, x86: Validate computation of branch displacements for x86-64
piotr-krysiuk Apr 5, 2021
f91f9d3
netfilter: x_tables: Use correct memory barriers.
Mar 8, 2021
09b096b
media: v4l: ioctl: Fix memory leak in video_usercopy
Dec 19, 2020
211f39e
msm: adsprpc: Handle UAF in process shell memory
Jul 15, 2021
e64ecac
dm ioctl: fix out of bounds array access when no devices
Mar 26, 2021
18ce7be
bluetooth: eliminate the potential race condition when removing the H…
f0rm2l1n Apr 12, 2021
512480c
vt: drop old FONT ioctls
Jan 5, 2021
1d349cc
seq_file: disallow extremely large seq buffer allocations
Jul 13, 2021
263c613
can: bcm: fix infoleak in struct bcm_msg_head
Jun 12, 2021
a1274d0
net: hso: register netdev later to avoid a race condition
akemnade Apr 26, 2017
07be4a7
usb: max-3421: Prevent corruption of freed memory
Jun 25, 2021
c696bca
net: xilinx_emaclite: Do not print real IOMEM pointer
May 19, 2021
024dbb3
epoll: do not insert into poll queues until all sanity checks are done
Sep 10, 2020
cd20e29
scsi: ufs: Correct the LUN used in eh_device_reset_handler() callback
Dec 28, 2020
2cb76db
staging: ion: Prevent incorrect reference counting behavour
Nov 26, 2021
2a7f65f
ext4: fix race writing to an inline_data file while its xattrs are ch…
tytso Aug 21, 2021
49e6e9d
net: 6pack: fix slab-out-of-bounds in decode_data
pskrgag Aug 13, 2021
6ef2c50
media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt()
Jan 24, 2022
9a2002d
phonet: refcount leak in pep_sock_accep
HBh25Y Dec 9, 2021
e989b37
quota: check block number when reading the block in quota file
zhangyi089 Oct 8, 2021
353bf7b
drm/i915: Flush TLBs before releasing backing store
tursulin Oct 19, 2021
860469a
udf: Fix NULL ptr deref when converting from inline format
jankara Jan 17, 2022
7e8197a
udf: Restore i_lenAlloc when inode expansion fails
jankara Jan 18, 2022
4799d54
ext4: fix kernel infoleak via ext4_extent_header
anirudhrb May 6, 2021
b374bc0
fuse: fix pipe buffer lifetime for direct_io
Mar 7, 2022
03283aa
af_key: add __GFP_ZERO flag for compose_sadb_supported in function pf…
YunDingLab Mar 8, 2022
15e8f36
net/x25: Fix null-ptr-deref caused by x25_disconnect
stonezdm Mar 26, 2022
746b6bd
floppy: use a statically allocated error counter
wtarreau May 8, 2022
54e9d6e
ath9k: fix use-after-free in ath9k_hif_usb_rx_cb
pskrgag Jun 13, 2022
8bde5c2
NFC: netlink: fix sleep in atomic bug when firmware download timeout
stonezdm May 4, 2022
5517a15
KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_deliv…
vittyvk Mar 25, 2022
9edf488
net: rose: fix UAF bugs caused by timer handler
stonezdm Jun 29, 2022
90a8af5
net_sched: cls_route: remove from list when handle is 0
Aug 9, 2022
299615b
af_key: Do not call xfrm_probe_algs in parallel
herbertx Aug 4, 2022
2478e10
video: fbdev: i740fb: Error out if 'pixclock' equals zero
ZheyuMa Apr 4, 2022
09ff09f
power: supply: wm8350-power: Add missing free in free_charger_irq
JiangJias Mar 3, 2022
77e4743
misc: sgi-gru: fix use-after-free error in gru_set_context_option, gr…
bluesheep1337 Nov 10, 2022
52b8b7e
bnx2x: fix potential memory leak in bnx2x_tpa_stop()
Sep 30, 2022
ac95a01
mISDN: fix use-after-free bugs in l1oip timer handlers
stonezdm Sep 28, 2022
81f4393
r8152: Rate limit overflow messages
Oct 2, 2022
a7b7b38
nilfs2: fix NULL pointer dereference at nilfs_bmap_lookup_at_level()
konis Oct 2, 2022
0721f83
vsock: Fix memory leak in vsock_connect()
peilin-ye Aug 8, 2022
27decb6
atm: idt77252: fix use-after-free bugs caused by tst_timer
stonezdm Aug 5, 2022
304b69f
proc: avoid integer type confusion in get_proc_long
torvalds Dec 5, 2022
b7e3063
USB: core: Prevent nested device-reset calls
AlanStern Aug 26, 2022
d42e057
igmp: Add ip_mc_list lock in ip_check_mc_rcu
liujian56 Jul 16, 2021
a0d19d8
FROMGIT: arm64: fix oops in concurrently setting insn_emulation sysctls
Jul 2, 2022
f7f42ed
xen/gntalloc: don't use gnttab_query_foreign_access()
jgross1 Feb 25, 2022
47d5f56
usb: gadget: clear related members when goto fail
HBh25Y Dec 31, 2021
58d8eda
USB: gadget: validate interface OS descriptor requests
szymonh Jan 24, 2022
6ca471f
sr9700: sanity check for packet length
oneukum Feb 17, 2022
76e5925
USB: gadget: validate endpoint index for xilinx udc
szymonh Feb 21, 2022
7c5ff9b
HID: elo: fix memory leak in elo_probe
mudongliang Jan 22, 2022
97efbf9
llc: fix netdevice reference leaks in llc_ui_bind()
edumazet Mar 23, 2022
7262c65
can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in err…
HBh25Y Feb 28, 2022
a4451a0
powerpc/32: Fix overread/overwrite of thread_struct via ptrace
mpe Jun 6, 2022
3c5c2eb
xen/arm: Fix race in RB-tree based P2M accounting
Jul 1, 2022
72348e3
x86: Clear .brk area at early boot
jgross1 Jun 30, 2022
7859fd9
drm/vmwgfx: Validate the box size for the snooped cursor
zackr Oct 26, 2022
dd59a5b
xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bund…
HBh25Y Jun 1, 2022
6285fde
mm: Force TLB flush for PFNMAP mappings before unlink_file_vma()
thejh Aug 31, 2022
91ee769
video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write
V4bel Jun 20, 2022
8cb0d46
HID: roccat: Fix use-after-free in roccat_read()
V4bel Sep 4, 2022
81d84ec
drivers: net: slip: fix NPD bug in sl_tx_timeout()
stonezdm Apr 5, 2022
dca581b
Bluetooth: L2CAP: Fix attempting to access uninitialized memory
Vudentz Oct 31, 2022
7d55ded
usb: mon: make mmapped memory read only
tstruk Sep 19, 2022
d6207db
Bluetooth: L2CAP: Fix u8 overflow
swkim101 Nov 18, 2022
0d768dd
ASoC: msm: qdsp6v2: return error when copy from userspace fails
Dec 5, 2016
a2e8782
f2fs: fix to do sanity check with node footer and iblocks
chaseyu Jun 29, 2018
55a2293
floppy: fix out-of-bounds read in copy_buffer
evdenis Jul 12, 2019
de0b8b0
do_epoll_ctl(): clean the failure exits up a bit
Aug 22, 2020
713754e
tty: Fix ->session locking
thejh Dec 3, 2020
7fdc049
usb: hso: fix error handling code of hso_create_net_device
mudongliang Jul 14, 2021
d481e6b
Diff only patches
SkewedZeppelin Jan 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ tcp_base_mss - INTEGER
Path MTU discovery (MTU probing). If MTU probing is enabled,
this is the initial MSS used by the connection.

tcp_min_snd_mss - INTEGER
TCP SYN and SYNACK messages usually advertise an ADVMSS option,
as described in RFC 1122 and RFC 6691.
If this ADVMSS option is smaller than tcp_min_snd_mss,
it is silently capped to tcp_min_snd_mss.

Default : 48 (at least 8 bytes of payload per segment)

tcp_congestion_control - STRING
Set the congestion control algorithm to be used for new
connections. The algorithm "reno" is always available, but
Expand Down
8 changes: 8 additions & 0 deletions arch/arm/include/asm/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,14 @@ tlb_remove_pmd_tlb_entry(struct mmu_gather *tlb, pmd_t *pmdp, unsigned long addr
tlb_add_flush(tlb, addr);
}

static inline void
tlb_flush_pmd_range(struct mmu_gather *tlb, unsigned long address,
unsigned long size)
{
tlb_add_flush(tlb, address);
tlb_add_flush(tlb, address + size - PMD_SIZE);
}

#define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr)
#define pmd_free_tlb(tlb, pmdp, addr) __pmd_free_tlb(tlb, pmdp, addr)
#define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp)
Expand Down
13 changes: 7 additions & 6 deletions arch/arm/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,18 +932,19 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)
{
current_thread_info()->syscall = scno;

/* Do the secure computing check first; failures should be fast. */
if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER);

/* Do seccomp after ptrace; syscall may have changed. */
#ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
if (secure_computing() == -1)
if (secure_computing(NULL) == -1)
return -1;
#else
/* XXX: remove this once OABI gets fixed */
secure_computing_strict(scno);
secure_computing_strict(current_thread_info()->syscall);
#endif

if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER);

/* Tracer or seccomp may have changed syscall. */
scno = current_thread_info()->syscall;

if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
Expand Down
14 changes: 8 additions & 6 deletions arch/arm/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,18 +624,20 @@ struct page *get_signal_page(void)

addr = page_address(page);

/* Poison the entire page */
memset32(addr, __opcode_to_mem_arm(0xe7fddef1),
PAGE_SIZE / sizeof(u32));

/* Give the signal return code some randomness */
offset = 0x200 + (get_random_int() & 0x7fc);
signal_return_offset = offset;

/*
* Copy signal return handlers into the vector page, and
* set sigreturn to be a pointer to these.
*/
/* Copy signal return handlers into the page */
memcpy(addr + offset, sigreturn_codes, sizeof(sigreturn_codes));

ptr = (unsigned long)addr + offset;
flush_icache_range(ptr, ptr + sizeof(sigreturn_codes));
/* Flush out all instructions in this page */
ptr = (unsigned long)addr;
flush_icache_range(ptr, ptr + PAGE_SIZE);

return page;
}
8 changes: 7 additions & 1 deletion arch/arm/kernel/sys_oabi-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,12 @@ asmlinkage long sys_oabi_epoll_wait(int epfd,
mm_segment_t fs;
long ret, err, i;

if (maxevents <= 0 || maxevents > (INT_MAX/sizeof(struct epoll_event)))
if (maxevents <= 0 ||
maxevents > (INT_MAX/sizeof(*kbuf)) ||
maxevents > (INT_MAX/sizeof(*events)))
return -EINVAL;
if (!access_ok(VERIFY_WRITE, events, sizeof(*events) * maxevents))
return -EFAULT;
kbuf = kmalloc(sizeof(*kbuf) * maxevents, GFP_KERNEL);
if (!kbuf)
return -ENOMEM;
Expand Down Expand Up @@ -317,6 +321,8 @@ asmlinkage long sys_oabi_semtimedop(int semid,

if (nsops < 1 || nsops > SEMOPM)
return -EINVAL;
if (!access_ok(VERIFY_READ, tsops, sizeof(*tsops) * nsops))
return -EFAULT;
sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL);
if (!sops)
return -ENOMEM;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/kvm/mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int kvm_handle_mmio_return(struct kvm_vcpu *vcpu, struct kvm_run *run)
}

trace_kvm_mmio(KVM_TRACE_MMIO_READ, len, run->mmio.phys_addr,
data);
&data);
data = vcpu_data_host_to_guest(vcpu, data, len);
*vcpu_reg(vcpu, vcpu->arch.mmio_decode.rt) = data;
}
Expand Down Expand Up @@ -193,7 +193,7 @@ int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run,
trace_kvm_mmio((mmio.is_write) ? KVM_TRACE_MMIO_WRITE :
KVM_TRACE_MMIO_READ_UNSATISFIED,
mmio.len, fault_ipa,
(mmio.is_write) ? data : 0);
(mmio.is_write) ? &data : 0);

if (mmio.is_write)
mmio_write_buf(mmio.data, mmio.len, data);
Expand Down
6 changes: 4 additions & 2 deletions arch/arm/xen/p2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new)

unsigned long __pfn_to_mfn(unsigned long pfn)
{
struct rb_node *n = phys_to_mach.rb_node;
struct rb_node *n;
struct xen_p2m_entry *entry;
unsigned long irqflags;

read_lock_irqsave(&p2m_lock, irqflags);
n = phys_to_mach.rb_node;
while (n) {
entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
if (entry->pfn <= pfn &&
Expand Down Expand Up @@ -122,10 +123,11 @@ bool __set_phys_to_machine_multi(unsigned long pfn,
int rc;
unsigned long irqflags;
struct xen_p2m_entry *p2m_entry;
struct rb_node *n = phys_to_mach.rb_node;
struct rb_node *n;

if (mfn == INVALID_P2M_ENTRY) {
write_lock_irqsave(&p2m_lock, irqflags);
n = phys_to_mach.rb_node;
while (n) {
p2m_entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
if (p2m_entry->pfn <= pfn &&
Expand Down
9 changes: 5 additions & 4 deletions arch/arm64/kernel/armv8_deprecated.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct insn_emulation {
static LIST_HEAD(insn_emulation);
static int nr_insn_emulated __initdata;
static DEFINE_RAW_SPINLOCK(insn_emulation_lock);
static DEFINE_MUTEX(insn_emulation_mutex);

static void register_emulation_hooks(struct insn_emulation_ops *ops)
{
Expand Down Expand Up @@ -208,10 +209,10 @@ static int emulation_proc_handler(struct ctl_table *table, int write,
loff_t *ppos)
{
int ret = 0;
struct insn_emulation *insn = (struct insn_emulation *) table->data;
struct insn_emulation *insn = container_of(table->data, struct insn_emulation, current_mode);
enum insn_emulation_mode prev_mode = insn->current_mode;

table->data = &insn->current_mode;
mutex_lock(&insn_emulation_mutex);
ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);

if (ret || !write || prev_mode == insn->current_mode)
Expand All @@ -224,7 +225,7 @@ static int emulation_proc_handler(struct ctl_table *table, int write,
update_insn_emulation_mode(insn, INSN_UNDEF);
}
ret:
table->data = insn;
mutex_unlock(&insn_emulation_mutex);
return ret;
}

Expand Down Expand Up @@ -254,7 +255,7 @@ static void __init register_insn_emulation_sysctl(struct ctl_table *table)
sysctl->maxlen = sizeof(int);

sysctl->procname = insn->ops->name;
sysctl->data = insn;
sysctl->data = &insn->current_mode;
sysctl->extra1 = &insn->min;
sysctl->extra2 = &insn->max;
sysctl->proc_handler = emulation_proc_handler;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static void show_data(unsigned long addr, int nbytes, const char *name)
if (addr < PAGE_OFFSET || addr > -256UL)
return;

printk("\n%s: %#lx:\n", name, addr);
printk("\n%s: %pS:\n", name, addr);

/*
* round address down to a 32 bit boundary
Expand Down
8 changes: 4 additions & 4 deletions arch/arm64/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1145,13 +1145,13 @@ static void tracehook_report_syscall(struct pt_regs *regs,

asmlinkage int syscall_trace_enter(struct pt_regs *regs)
{
/* Do the secure computing check first; failures should be fast. */
if (secure_computing() == -1)
return -1;

if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER);

/* Do the secure computing after ptrace; failures should be fast. */
if (secure_computing(NULL) == -1)
return -1;

if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
trace_sys_enter(regs, regs->syscallno);

Expand Down
16 changes: 16 additions & 0 deletions arch/arm64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,19 @@ static void cntfrq_read_handler(unsigned int esr, struct pt_regs *regs)
regs->pc += 4;
}

static void cntpct_read_handler(unsigned int esr, struct pt_regs *regs)
{
int rt = (esr & ESR_ELx_SYS64_ISS_RT_MASK) >> ESR_ELx_SYS64_ISS_RT_SHIFT;

isb();
if (rt != 31)
regs->regs[rt] = arch_counter_get_cntpct();
regs->pc += 4;
}

#define ESR_ELx_SYS64_ISS_SYS_CNTPCT (ESR_ELx_SYS64_ISS_SYS_VAL(3, 3, 1, 14, 0) | \
ESR_ELx_SYS64_ISS_DIR_READ)

asmlinkage void __exception do_sysinstr(unsigned int esr, struct pt_regs *regs)
{
if ((esr & ESR_ELx_SYS64_ISS_SYS_OP_MASK) == ESR_ELx_SYS64_ISS_SYS_CNTVCT) {
Expand All @@ -427,6 +440,9 @@ asmlinkage void __exception do_sysinstr(unsigned int esr, struct pt_regs *regs)
} else if ((esr & ESR_ELx_SYS64_ISS_SYS_OP_MASK) == ESR_ELx_SYS64_ISS_SYS_CNTFRQ) {
cntfrq_read_handler(esr, regs);
return;
} else if ((esr & ESR_ELx_SYS64_ISS_SYS_OP_MASK) == ESR_ELx_SYS64_ISS_SYS_CNTPCT) {
cntpct_read_handler(esr, regs);
return;
}

do_undefinstr(regs);
Expand Down
10 changes: 10 additions & 0 deletions arch/ia64/include/asm/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,16 @@ __tlb_remove_tlb_entry (struct mmu_gather *tlb, pte_t *ptep, unsigned long addre
tlb->end_addr = address + PAGE_SIZE;
}

static inline void
tlb_flush_pmd_range(struct mmu_gather *tlb, unsigned long address,
unsigned long size)
{
if (tlb->start_addr > address)
tlb->start_addr = address;
if (tlb->end_addr < address + size)
tlb->end_addr = address + size;
}

#define tlb_migrate_finish(mm) platform_tlb_migrate_finish(mm)

#define tlb_start_vma(tlb, vma) do { } while (0)
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)
long ret = 0;
user_exit();

if (secure_computing() == -1)
if (secure_computing(NULL) == -1)
return -1;

if (test_thread_flag(TIF_SYSCALL_TRACE) &&
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/configs/pasemi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ CONFIG_FB_NVIDIA=y
CONFIG_FB_NVIDIA_I2C=y
CONFIG_FB_RADEON=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_VGACON_SOFT_SCROLLBACK=y
CONFIG_LOGO=y
CONFIG_SOUND=y
CONFIG_SND=y
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/configs/ppc6xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,6 @@ CONFIG_FB_SM501=m
CONFIG_FB_IBM_GXT4500=y
CONFIG_LCD_PLATFORM=m
CONFIG_DISPLAY_SUPPORT=m
CONFIG_VGACON_SOFT_SCROLLBACK=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
#define MSR_TS_T __MASK(MSR_TS_T_LG) /* Transaction Transactional */
#define MSR_TS_MASK (MSR_TS_T | MSR_TS_S) /* Transaction State bits */
#define MSR_TM_ACTIVE(x) (((x) & MSR_TS_MASK) != 0) /* Transaction active? */
#define MSR_TM_RESV(x) (((x) & MSR_TS_MASK) == MSR_TS_MASK) /* Reserved */
#define MSR_TM_TRANSACTIONAL(x) (((x) & MSR_TS_MASK) == MSR_TS_T)
#define MSR_TM_SUSPENDED(x) (((x) & MSR_TS_MASK) == MSR_TS_S)

Expand Down
18 changes: 18 additions & 0 deletions arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,24 @@ static void tm_reclaim_thread(struct thread_struct *thr,
msr_diff &= MSR_FP | MSR_VEC | MSR_VSX | MSR_FE0 | MSR_FE1;
}

/*
* Use the current MSR TM suspended bit to track if we have
* checkpointed state outstanding.
* On signal delivery, we'd normally reclaim the checkpointed
* state to obtain stack pointer (see:get_tm_stackpointer()).
* This will then directly return to userspace without going
* through __switch_to(). However, if the stack frame is bad,
* we need to exit this thread which calls __switch_to() which
* will again attempt to reclaim the already saved tm state.
* Hence we need to check that we've not already reclaimed
* this state.
* We do this using the current MSR, rather tracking it in
* some specific thread_struct bit, as it has the additional
* benifit of checking for a potential TM bad thing exception.
*/
if (!MSR_TM_SUSPENDED(mfmsr()))
return;

tm_reclaim(thr, thr->regs->msr, cause);

/* Having done the reclaim, we now have the checkpointed
Expand Down
18 changes: 14 additions & 4 deletions arch/powerpc/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1556,8 +1556,13 @@ long arch_ptrace(struct task_struct *child, long request,

flush_fp_to_thread(child);
if (fpidx < (PT_FPSCR - PT_FPR0))
memcpy(&tmp, &child->thread.TS_FPR(fpidx),
sizeof(long));
if (IS_ENABLED(CONFIG_PPC32)) {
// On 32-bit the index we are passed refers to 32-bit words
tmp = ((u32 *)child->thread.fp_state.fpr)[fpidx];
} else {
memcpy(&tmp, &child->thread.TS_FPR(fpidx),
sizeof(long));
}
else
tmp = child->thread.fp_state.fpscr;
}
Expand Down Expand Up @@ -1589,8 +1594,13 @@ long arch_ptrace(struct task_struct *child, long request,

flush_fp_to_thread(child);
if (fpidx < (PT_FPSCR - PT_FPR0))
memcpy(&child->thread.TS_FPR(fpidx), &data,
sizeof(long));
if (IS_ENABLED(CONFIG_PPC32)) {
// On 32-bit the index we are passed refers to 32-bit words
((u32 *)child->thread.fp_state.fpr)[fpidx] = data;
} else {
memcpy(&child->thread.TS_FPR(fpidx), &data,
sizeof(long));
}
else
child->thread.fp_state.fpscr = data;
ret = 0;
Expand Down
17 changes: 12 additions & 5 deletions arch/powerpc/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,15 @@ static long restore_tm_user_regs(struct pt_regs *regs,
return 1;
#endif /* CONFIG_SPE */

/* Get the top half of the MSR from the user context */
if (__get_user(msr_hi, &tm_sr->mc_gregs[PT_MSR]))
return 1;
msr_hi <<= 32;
/* If TM bits are set to the reserved value, it's an invalid context */
if (MSR_TM_RESV(msr_hi))
return 1;
/* Pull in the MSR TM bits from the user context */
regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr_hi & MSR_TS_MASK);
/* Now, recheckpoint. This loads up all of the checkpointed (older)
* registers, including FP and V[S]Rs. After recheckpointing, the
* transactional versions should be loaded.
Expand All @@ -884,11 +893,6 @@ static long restore_tm_user_regs(struct pt_regs *regs,
current->thread.tm_texasr |= TEXASR_FS;
/* This loads the checkpointed FP/VEC state, if used */
tm_recheckpoint(&current->thread, msr);
/* Get the top half of the MSR */
if (__get_user(msr_hi, &tm_sr->mc_gregs[PT_MSR]))
return 1;
/* Pull in MSR TM from user context */
regs->msr = (regs->msr & ~MSR_TS_MASK) | ((msr_hi<<32) & MSR_TS_MASK);

/* This loads the speculative FP/VEC state, if used */
if (msr & MSR_FP) {
Expand Down Expand Up @@ -1252,6 +1256,9 @@ long sys_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
goto bad;

if (MSR_TM_ACTIVE(msr_hi<<32)) {
/* Trying to start TM on non TM system */
if (!cpu_has_feature(CPU_FTR_TM))
goto bad;
/* We only recheckpoint on return if we're
* transaction.
*/
Expand Down
Loading