commit_msg
stringlengths
1
24.2k
commit_hash
stringlengths
2
84
project
stringlengths
2
40
source
stringclasses
4 values
labels
int64
0
1
repo_url
stringlengths
26
70
commit_url
stringlengths
74
118
commit_date
stringlengths
25
25
x86/xen: Use clear_bss() for Xen PV guests Instead of clearing the bss area in assembly code, use the clear_bss() function. This requires to pass the start_info address as parameter to xen_start_kernel() in order to avoid the xen_start_info being zeroed again. Signed-off-by: Juergen Gross <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Jan Beulich <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected]
96e8fc5818686d4a1591bb6907e7fdb64ef29884
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/96e8fc5818686d4a1591bb6907e7fdb64ef29884
2022-07-01 10:57:52+02:00
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_verifier Tainted: G W 4.17.0-rc3+ #7 [ 207.974956] Hardware name: FOXCONN R2-1221R-A4/C2U4N_MB, BIOS G31FB18A 03/31/2017 [ 207.982428] pstate: 60400005 (nZCv daif +PAN -UAO) [ 207.987214] pc : bpf_skb_load_helper_8_no_cache+0x34/0xc0 [ 207.992603] lr : 0xffff000000bdb754 [ 207.996080] sp : ffff000013703ca0 [ 207.999384] x29: ffff000013703ca0 x28: 0000000000000001 [ 208.004688] x27: 0000000000000001 x26: 0000000000000000 [ 208.009992] x25: ffff000013703ce0 x24: ffff800fb4afcb00 [ 208.015295] x23: ffff00007d2f5038 x22: ffff00007d2f5000 [ 208.020599] x21: fffffffffeff2a6f x20: 000000000000000a [ 208.025903] x19: ffff000009578000 x18: 0000000000000a03 [ 208.031206] x17: 0000000000000000 x16: 0000000000000000 [ 208.036510] x15: 0000ffff9de83000 x14: 0000000000000000 [ 208.041813] x13: 0000000000000000 x12: 0000000000000000 [ 208.047116] x11: 0000000000000001 x10: ffff0000089e7f18 [ 208.052419] x9 : fffffffffeff2a6f x8 : 0000000000000000 [ 208.057723] x7 : 000000000000000a x6 : 00280c6160000000 [ 208.063026] x5 : 0000000000000018 x4 : 0000000000007db6 [ 208.068329] x3 : 000000000008647a x2 : 19868179b1484500 [ 208.073632] x1 : 0000000000000000 x0 : ffff000009578c08 [ 208.078938] Process test_verifier (pid: 2256, stack limit = 0x0000000049ca7974) [ 208.086235] Call trace: [ 208.088672] bpf_skb_load_helper_8_no_cache+0x34/0xc0 [ 208.093713] 0xffff000000bdb754 [ 208.096845] bpf_test_run+0x78/0xf8 [ 208.100324] bpf_prog_test_run_skb+0x148/0x230 [ 208.104758] sys_bpf+0x314/0x1198 [ 208.108064] el0_svc_naked+0x30/0x34 [ 208.111632] Code: 91302260 f9400001 f9001fa1 d2800001 (29500680) [ 208.117717] ---[ end trace 263cb8a59b5bf29f ]--- The program itself which caused this had a long jump over the whole instruction sequence where all of the inner instructions required heavy expansions into multiple BPF instructions. Additionally, I also had BPF hardening enabled which requires once more rewrites of all constant values in order to blind them. Each time we rewrite insns, bpf_adj_branches() would need to potentially adjust branch targets which cross the patchlet boundary to accommodate for the additional delta. Eventually that lead to the case where the target offset could not fit into insn->off's upper 0x7fff limit anymore where then offset wraps around becoming negative (in s16 universe), or vice versa depending on the jump direction. Therefore it becomes necessary to detect and reject any such occasions in a generic way for native eBPF and cBPF to eBPF migrations. For the latter we can simply check bounds in the bpf_convert_filter()'s BPF_EMIT_JMP helper macro and bail out once we surpass limits. The bpf_patch_insn_single() for native eBPF (and cBPF to eBPF in case of subsequent hardening) is a bit more complex in that we need to detect such truncations before hitting the bpf_prog_realloc(). Thus the latter is split into an extra pass to probe problematic offsets on the original program in order to fail early. With that in place and carefully tested I no longer hit the panic and the rewrites are rejected properly. The above example panic I've seen on bpf-next, though the issue itself is generic in that a guard against this issue in bpf seems more appropriate in this case. Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Martin KaFai Lau <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
050fad7c4534c13c8eb1d9c2ba66012e014773cb
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/050fad7c4534c13c8eb1d9c2ba66012e014773cb
2018-05-17 16:05:35-07:00
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
09ba3bc9dd150457c506e4661380a6183af651c1
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1
2019-02-25 14:13:24+01:00
media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame 'vb' null check should be done before dereferencing it in tw5864_handle_frame, otherwise a NULL pointer dereference may occur. Fixes: 34d1324edd31 ("[media] pci: Add tw5864 driver") Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2e7682ebfc750177a4944eeb56e97a3f05734528
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/2e7682ebfc750177a4944eeb56e97a3f05734528
2019-03-29 07:43:17-04:00
drm/ttm: fix out-of-bounds read in ttm_put_pages() v2 When ttm_put_pages() tries to figure out whether it's dealing with transparent hugepages, it just reads past the bounds of the pages array without a check. v2: simplify the test if enough pages are left in the array (Christian). Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Christian König <[email protected]> Fixes: 5c42c64f7d54 ("drm/ttm: fix the fix for huge compound pages") Cc: [email protected] Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
a66477b0efe511d98dde3e4aaeb189790e6f0a39
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/a66477b0efe511d98dde3e4aaeb189790e6f0a39
2019-04-11 10:01:23-05:00
drm/ttm: fix start page for huge page check in ttm_put_pages() The first page entry is always the same with itself. Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
ac1e516d5a4c56bf0cb4a3dfc0672f689131cfd4
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/ac1e516d5a4c56bf0cb4a3dfc0672f689131cfd4
2019-04-11 10:01:23-05:00
drm/ttm: fix incrementing the page pointer for huge pages When we increment the counter we need to increment the pointer as well. Signed-off-by: Christian König <[email protected]> Fixes: e16858a7e6e7 drm/ttm: fix start page for huge page check in ttm_put_pages() Reviewed-by: Michel Dänzer <[email protected]> Acked-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
453393369dc9806d2455151e329c599684762428
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/453393369dc9806d2455151e329c599684762428
2019-04-11 10:01:51-05:00
powerpc/powernv/idle: Restore AMR/UAMOR/AMOR after idle In order to implement KUAP (Kernel Userspace Access Protection) on Power9 we will be using the AMR, and therefore indirectly the UAMOR/AMOR. So save/restore these regs in the idle code. Signed-off-by: Michael Ellerman <[email protected]>
53a712bae5dd919521a58d7bad773b949358add0
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/53a712bae5dd919521a58d7bad773b949358add0
2019-04-21 23:05:54+10:00
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <[email protected]>
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
2019-07-03 08:52:54-07:00
sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices It has been observed, that highly-threaded, non-cpu-bound applications running under cpu.cfs_quota_us constraints can hit a high percentage of periods throttled while simultaneously not consuming the allocated amount of quota. This use case is typical of user-interactive non-cpu bound applications, such as those running in kubernetes or mesos when run on multiple cpu cores. This has been root caused to cpu-local run queue being allocated per cpu bandwidth slices, and then not fully using that slice within the period. At which point the slice and quota expires. This expiration of unused slice results in applications not being able to utilize the quota for which they are allocated. The non-expiration of per-cpu slices was recently fixed by 'commit 512ac999d275 ("sched/fair: Fix bandwidth timer clock drift condition")'. Prior to that it appears that this had been broken since at least 'commit 51f2176d74ac ("sched/fair: Fix unlocked reads of some cfs_b->quota/period")' which was introduced in v3.16-rc1 in 2014. That added the following conditional which resulted in slices never being expired. if (cfs_rq->runtime_expires != cfs_b->runtime_expires) { /* extend local deadline, drift is bounded above by 2 ticks */ cfs_rq->runtime_expires += TICK_NSEC; Because this was broken for nearly 5 years, and has recently been fixed and is now being noticed by many users running kubernetes (https://github.com/kubernetes/kubernetes/issues/67577) it is my opinion that the mechanisms around expiring runtime should be removed altogether. This allows quota already allocated to per-cpu run-queues to live longer than the period boundary. This allows threads on runqueues that do not use much CPU to continue to use their remaining slice over a longer period of time than cpu.cfs_period_us. However, this helps prevent the above condition of hitting throttling while also not fully utilizing your cpu quota. This theoretically allows a machine to use slightly more than its allotted quota in some periods. This overflow would be bounded by the remaining quota left on each per-cpu runqueueu. This is typically no more than min_cfs_rq_runtime=1ms per cpu. For CPU bound tasks this will change nothing, as they should theoretically fully utilize all of their quota in each period. For user-interactive tasks as described above this provides a much better user/application experience as their cpu utilization will more closely match the amount they requested when they hit throttling. This means that cpu limits no longer strictly apply per period for non-cpu bound applications, but that they are still accurate over longer timeframes. This greatly improves performance of high-thread-count, non-cpu bound applications with low cfs_quota_us allocation on high-core-count machines. In the case of an artificial testcase (10ms/100ms of quota on 80 CPU machine), this commit resulted in almost 30x performance improvement, while still maintaining correct cpu quota restrictions. That testcase is available at https://github.com/indeedeng/fibtest. Fixes: 512ac999d275 ("sched/fair: Fix bandwidth timer clock drift condition") Signed-off-by: Dave Chiluk <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Phil Auld <[email protected]> Reviewed-by: Ben Segall <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: John Hammond <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Kyle Anderson <[email protected]> Cc: Gabriel Munos <[email protected]> Cc: Peter Oskolkov <[email protected]> Cc: Cong Wang <[email protected]> Cc: Brendan Gregg <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
de53fd7aedb100f03e5d2231cfce0e4993282425
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/de53fd7aedb100f03e5d2231cfce0e4993282425
2019-08-08 09:09:30+02:00
mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings mwifiex_update_vs_ie(),mwifiex_set_uap_rates() and mwifiex_set_wmm_params() call memcpy() without checking the destination size.Since the source is given from user-space, this may trigger a heap buffer overflow. Fix them by putting the length check before performing memcpy(). This fix addresses CVE-2019-14814,CVE-2019-14815,CVE-2019-14816. Signed-off-by: Wen Huang <[email protected]> Acked-by: Ganapathi Bhat <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
7caac62ed598a196d6ddf8d9c121e12e082cac3a
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/7caac62ed598a196d6ddf8d9c121e12e082cac3a
2019-09-03 16:50:21+03:00
ath9k_htc: release allocated buffer if timed out In htc_config_pipe_credits, htc_setup_complete, and htc_connect_service if time out happens, the allocated buffer needs to be released. Otherwise there will be memory leak. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
853acf7caf10b828102d92d05b5c101666a6142b
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/853acf7caf10b828102d92d05b5c101666a6142b
2019-09-10 16:28:29+03:00
ath9k: release allocated buffer if timed out In ath9k_wmi_cmd, the allocated network buffer needs to be released if timeout happens. Otherwise memory will be leaked. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
728c1e2a05e4b5fc52fab3421dce772a806612a2
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/728c1e2a05e4b5fc52fab3421dce772a806612a2
2019-09-10 16:31:40+03:00
net: qrtr: fix memort leak in qrtr_tun_write_iter In qrtr_tun_write_iter the allocated kbuf should be release in case of error or success return. v2 Update: Thanks to David Miller for pointing out the release on success path as well. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: David S. Miller <[email protected]>
a21b7f0cff1906a93a0130b74713b15a0b36481d
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/a21b7f0cff1906a93a0130b74713b15a0b36481d
2019-09-12 11:58:44+01:00
RDMA: Fix goto target to release the allocated memory In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory should be released by goto fail. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Navid Emamdoost <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
4a9d46a9fe14401f21df69cea97c62396d5fb053
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/4a9d46a9fe14401f21df69cea97c62396d5fb053
2019-09-13 16:55:55-03:00
ipv6: fix a typo in fib6_rule_lookup() Yi Ren reported an issue discovered by syzkaller, and bisected to the cited commit. Many thanks to Yi, this trivial patch does not reflect the patient work that has been done. Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic") Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Wei Wang <[email protected]> Bisected-and-reported-by: Yi Ren <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
7b09c2d052db4b4ad0b27b97918b46a7746966fa
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/7b09c2d052db4b4ad0b27b97918b46a7746966fa
2019-09-20 19:17:57-07:00
ath10k: fix memory leak In ath10k_usb_hif_tx_sg the allocated urb should be released if usb_submit_urb fails. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
b8d17e7d93d2beb89e4f34c59996376b8b544792
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/b8d17e7d93d2beb89e4f34c59996376b8b544792
2019-09-23 11:28:50+03:00
drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
104c307147ad379617472dd91a5bcb368d72bd6d
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/104c307147ad379617472dd91a5bcb368d72bd6d
2019-09-25 14:58:38-05:00
ipv6: do not free rt if FIB_LOOKUP_NOREF is set on suppress rule Commit 7d9e5f422150 removed references from certain dsts, but accounting for this never translated down into the fib6 suppression code. This bug was triggered by WireGuard users who use wg-quick(8), which uses the "suppress-prefix" directive to ip-rule(8) for routing all of their internet traffic without routing loops. The test case added here causes the reference underflow by causing packets to evaluate a suppress rule. Fixes: 7d9e5f422150 ("ipv6: convert major tx path to use RT6_LOOKUP_F_DST_NOREF") Signed-off-by: Jason A. Donenfeld <[email protected]> Acked-by: Wei Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
ca7a03c4175366a92cee0ccc4fec0038c3266e26
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/ca7a03c4175366a92cee0ccc4fec0038c3266e26
2019-09-26 09:34:25+02:00
nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs In nfp_flower_spawn_phy_reprs, in the for loop over eth_tbl if any of intermediate allocations or initializations fail memory is leaked. requiered releases are added. Fixes: b94524529741 ("nfp: flower: add per repr private data for LAG offload") Signed-off-by: Navid Emamdoost <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
8572cea1461a006bce1d06c0c4b0575869125fa4
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/8572cea1461a006bce1d06c0c4b0575869125fa4
2019-09-27 20:10:52+02:00
nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs In nfp_flower_spawn_vnic_reprs in the loop if initialization or the allocations fail memory is leaked. Appropriate releases are added. Fixes: b94524529741 ("nfp: flower: add per repr private data for LAG offload") Signed-off-by: Navid Emamdoost <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
8ce39eb5a67aee25d9f05b40b673c95b23502e3e
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/8ce39eb5a67aee25d9f05b40b673c95b23502e3e
2019-09-27 20:12:03+02:00
nfp: abm: fix memory leak in nfp_abm_u32_knode_replace In nfp_abm_u32_knode_replace if the allocation for match fails it should go to the error handling instead of returning. Updated other gotos to have correct errno returned, too. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: David S. Miller <[email protected]>
78beef629fd95be4ed853b2d37b832f766bd96ca
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/78beef629fd95be4ed853b2d37b832f766bd96ca
2019-09-27 20:55:51+02:00
ieee802154: ca8210: prevent memory leak In ca8210_probe the allocated pdata needs to be assigned to spi_device->dev.platform_data before calling ca8210_get_platform_data. Othrwise when ca8210_get_platform_data fails pdata cannot be released. Signed-off-by: Navid Emamdoost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stefan Schmidt <[email protected]>
6402939ec86eaf226c8b8ae00ed983936b164908
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/6402939ec86eaf226c8b8ae00ed983936b164908
2019-09-27 21:57:42+02:00
tracing: Have error path in predicate_parse() free its allocated memory In predicate_parse, there is an error path that is not going to out_free instead it returns directly which leads to a memory leak. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
96c5c6e6a5b6db592acae039fed54b5c8844cd35
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/96c5c6e6a5b6db592acae039fed54b5c8844cd35
2019-09-28 17:13:39-04:00
scsi: bfa: release allocated memory in case of error In bfad_im_get_stats if bfa_port_get_stats fails, allocated memory needs to be released. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
0e62395da2bd5166d7c9e14cbc7503b256a34cb0
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/0e62395da2bd5166d7c9e14cbc7503b256a34cb0
2019-09-30 22:54:15-04:00
rsi: release skb if rsi_prepare_beacon fails In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should be released. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
d563131ef23cbc756026f839a82598c8445bc45f
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/d563131ef23cbc756026f839a82598c8445bc45f
2019-10-01 12:18:48+03:00
rtlwifi: prevent memory leak in rtl_usb_probe In rtl_usb_probe if allocation for usb_data fails the allocated hw should be released. In addition the allocated rtlpriv->usb_data should be released on error handling path. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
3f93616951138a598d930dcaec40f2bfd9ce43bb
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/3f93616951138a598d930dcaec40f2bfd9ce43bb
2019-10-01 12:20:29+03:00
RDMA/hfi1: Prevent memory leak in sdma_init In sdma_init if rhashtable_init fails the allocated memory for tmp_sdma_rht should be released. Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Navid Emamdoost <[email protected]> Acked-by: Dennis Dalessandro <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
34b3be18a04ecdc610aae4c48e5d1b799d8689f6
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/34b3be18a04ecdc610aae4c48e5d1b799d8689f6
2019-10-01 11:34:55-03:00
spi: gpio: prevent memory leak in spi_gpio_probe In spi_gpio_probe an SPI master is allocated via spi_alloc_master, but this controller should be released if devm_add_action_or_reset fails, otherwise memory leaks. In order to avoid leak spi_contriller_put must be called in case of failure for devm_add_action_or_reset. Fixes: 8b797490b4db ("spi: gpio: Make sure spi_master_put() is called in every error path") Signed-off-by: Navid Emamdoost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
d3b0ffa1d75d5305ebe34735598993afbb8a869d
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/d3b0ffa1d75d5305ebe34735598993afbb8a869d
2019-10-01 18:38:52+01:00
spi: lpspi: fix memory leak in fsl_lpspi_probe In fsl_lpspi_probe an SPI controller is allocated either via spi_alloc_slave or spi_alloc_master. In all but one error cases this controller is put by going to error handling code. This commit fixes the case when pm_runtime_get_sync fails and it should go to the error handling path. Fixes: 944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi") Signed-off-by: Navid Emamdoost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
057b8945f78f76d0b04eeb5c27cd9225e5e7ad86
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/057b8945f78f76d0b04eeb5c27cd9225e5e7ad86
2019-10-01 18:39:12+01:00
rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost <[email protected]> Reviewed-by: Chris Chiu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
2019-10-02 07:31:26+03:00
drm/amdgpu: fix multiple memory leaks in acp_hw_init In acp_hw_init there are some allocations that needs to be released in case of failure: 1- adev->acp.acp_genpd should be released if any allocation attemp for adev->acp.acp_cell, adev->acp.acp_res or i2s_pdata fails. 2- all of those allocations should be released if mfd_add_hotplug_devices or pm_genpd_add_device fail. 3- Release is needed in case of time out values expire. Reviewed-by: Christian König <[email protected]> Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
57be09c6e8747bf48704136d9e3f92bfb93f5725
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/57be09c6e8747bf48704136d9e3f92bfb93f5725
2019-10-02 12:58:33-05:00
drm/amd/display: memory leak In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated clk_src needs release. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
055e547478a11a6360c7ce05e2afc3e366968a12
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/055e547478a11a6360c7ce05e2afc3e366968a12
2019-10-02 12:58:33-05:00
crypto: ccp - Release all allocated memory if sha type is invalid Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost <[email protected]> Acked-by: Gary R Hook <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
128c66429247add5128c03dc1e144ca56f05a4e2
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/128c66429247add5128c03dc1e144ca56f05a4e2
2019-10-05 01:06:20+10:00
misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach In fastrpc_dma_buf_attach if dma_get_sgtable fails the allocated memory for a should be released. Signed-off-by: Navid Emamdoost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
fc739a058d99c9297ef6bfd923b809d85855b9a9
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/fc739a058d99c9297ef6bfd923b809d85855b9a9
2019-10-04 18:22:14+02:00
rpmsg: char: release allocated memory In rpmsg_eptdev_write_iter, if copy_from_iter_full fails the allocated buffer needs to be released. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]>
bbe692e349e2a1edf3fe0a29a0e05899c9c94d51
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/bbe692e349e2a1edf3fe0a29a0e05899c9c94d51
2019-10-04 21:13:47-07:00
media: rc: prevent memory leak in cx23888_ir_probe In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state should be released. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
a7b2df76b42bdd026e3106cf2ba97db41345a177
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/a7b2df76b42bdd026e3106cf2ba97db41345a177
2019-10-07 07:44:16-03:00
nl80211: fix memory leak in nl80211_get_ftm_responder_stats In nl80211_get_ftm_responder_stats, a new skb is created via nlmsg_new named msg. If nl80211hdr_put() fails, then msg should be released. The return statement should be replace by goto to error handling code. Fixes: 81e54d08d9d8 ("cfg80211: support FTM responder configuration/statistics") Signed-off-by: Navid Emamdoost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1399c59fa92984836db90538cf92397fe7caaa57
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/1399c59fa92984836db90538cf92397fe7caaa57
2019-10-07 21:34:52+02:00
mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf In mwifiex_pcie_alloc_cmdrsp_buf, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release is added. Fixes: fc3314609047 ("mwifiex: use pci_alloc/free_consistent APIs for PCIe") Signed-off-by: Navid Emamdoost <[email protected]> Acked-by: Ganapathi Bhat <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
db8fd2cde93227e566a412cf53173ffa227998bc
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/db8fd2cde93227e566a412cf53173ffa227998bc
2019-10-09 11:24:52+03:00
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release for skb and card->evtbd_ring_vbase is added. Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines") Signed-off-by: Navid Emamdoost <[email protected]> Acked-by: Ganapathi Bhat <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
d10dcb615c8e29d403a24d35f8310a7a53e3050c
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/d10dcb615c8e29d403a24d35f8310a7a53e3050c
2019-10-09 11:25:22+03:00
iwlwifi: dbg_ini: fix memory leak in alloc_sgtable In alloc_sgtable if alloc_page fails, the alocated table should be released. Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
b4b814fec1a5a849383f7b3886b654a13abbda7d
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/b4b814fec1a5a849383f7b3886b654a13abbda7d
2019-10-09 13:01:06+03:00
iwlwifi: pcie: fix memory leaks in iwl_pcie_ctxt_info_gen3_init In iwl_pcie_ctxt_info_gen3_init there are cases that the allocated dma memory is leaked in case of error. DMA memories prph_scratch, prph_info, and ctxt_info_gen3 are allocated and initialized to be later assigned to trans_pcie. But in any error case before such assignment the allocated memories should be released. First of such error cases happens when iwl_pcie_init_fw_sec fails. Current implementation correctly releases prph_scratch. But in two sunsequent error cases where dma_alloc_coherent may fail, such releases are missing. This commit adds release for prph_scratch when allocation for prph_info fails, and adds releases for prph_scratch and prph_info when allocation for ctxt_info_gen3 fails. Fixes: 2ee824026288 ("iwlwifi: pcie: support context information for 22560 devices") Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
0f4f199443faca715523b0659aa536251d8b978f
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/0f4f199443faca715523b0659aa536251d8b978f
2019-10-09 13:01:06+03:00
iio: imu: adis16400: release allocated memory on failure In adis_update_scan_mode, if allocation for adis->buffer fails, previously allocated adis->xfer needs to be released. Signed-off-by: Navid Emamdoost <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
ab612b1daf415b62c58e130cb3d0f30b255a14d0
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/ab612b1daf415b62c58e130cb3d0f30b255a14d0
2019-10-09 19:11:27+01:00
iio: imu: adis16400: fix memory leak In adis_update_scan_mode_burst, if adis->buffer allocation fails release the adis->xfer. Signed-off-by: Navid Emamdoost <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
9c0530e898f384c5d279bfcebd8bb17af1105873
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/9c0530e898f384c5d279bfcebd8bb17af1105873
2019-10-09 19:11:27+01:00
crypto: user - fix memory leak in crypto_report In crypto_report, a new skb is created via nlmsg_new(). This skb should be released if crypto_report_alg() fails. Fixes: a38f7907b926 ("crypto: Add userspace configuration API") Cc: <[email protected]> Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
ffdde5932042600c6807d46c1550b28b0db6a3bc
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/ffdde5932042600c6807d46c1550b28b0db6a3bc
2019-10-10 23:42:45+11:00
crypto: user - fix memory leak in crypto_reportstat In crypto_reportstat, a new skb is created by nlmsg_new(). This skb is leaked if crypto_reportstat_alg() fails. Required release for skb is added. Fixes: cac5818c25d0 ("crypto: user - Implement a generic crypto statistics") Cc: <[email protected]> Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
c03b04dcdba1da39903e23cc4d072abf8f68f2dd
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/c03b04dcdba1da39903e23cc4d072abf8f68f2dd
2019-10-10 23:42:45+11:00
virt: vbox: fix memory leak in hgcm_call_preprocess_linaddr In hgcm_call_preprocess_linaddr memory is allocated for bounce_buf but is not released if copy_form_user fails. In order to prevent memory leak in case of failure, the assignment to bounce_buf_ret is moved before the error check. This way the allocated bounce_buf will be released by the caller. Fixes: 579db9d45cb4 ("virt: Add vboxguest VMMDEV communication code") Signed-off-by: Navid Emamdoost <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
e0b0cb9388642c104838fac100a4af32745621e2
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/e0b0cb9388642c104838fac100a4af32745621e2
2019-10-10 14:50:32+02:00
net/mlx5: prevent memory leak in mlx5_fpga_conn_create_cq In mlx5_fpga_conn_create_cq if mlx5_vector2eqn fails the allocated memory should be released. Fixes: 537a50574175 ("net/mlx5: FPGA, Add high-speed connection routines") Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
c8c2a057fdc7de1cd16f4baa51425b932a42eb39
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/c8c2a057fdc7de1cd16f4baa51425b932a42eb39
2019-10-18 12:11:54-07:00
net/mlx5: fix memory leak in mlx5_fw_fatal_reporter_dump In mlx5_fw_fatal_reporter_dump if mlx5_crdump_collect fails the allocated memory for cr_data must be released otherwise there will be memory leak. To fix this, this commit changes the return instruction into goto error handling. Fixes: 9b1f29823605 ("net/mlx5: Add support for FW fatal reporter dump") Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
c7ed6d0183d5ea9bc31bcaeeba4070bd62546471
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/c7ed6d0183d5ea9bc31bcaeeba4070bd62546471
2019-10-18 12:11:55-07:00
ipmi: Fix memory leak in __ipmi_bmc_register In the impelementation of __ipmi_bmc_register() the allocated memory for bmc should be released in case ida_simple_get() fails. Fixes: 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name") Signed-off-by: Navid Emamdoost <[email protected]> Message-Id: <[email protected]> Signed-off-by: Corey Minyard <[email protected]>
4aa7afb0ee20a97fbf0c5bab3df028d5fb85fdab
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/4aa7afb0ee20a97fbf0c5bab3df028d5fb85fdab
2019-10-22 14:42:34-05:00
drm/v3d: Fix memory leak in v3d_submit_cl_ioctl In the impelementation of v3d_submit_cl_ioctl() there are two memory leaks. One is when allocation for bin fails, and the other is when bin initialization fails. If kcalloc fails to allocate memory for bin then render->base should be put. Also, if v3d_job_init() fails to initialize bin->base then allocated memory for bin should be released. Fixes: a783a09ee76d ("drm/v3d: Refactor job management.") Signed-off-by: Navid Emamdoost <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
29cd13cfd7624726d9e6becbae9aa419ef35af7f
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/29cd13cfd7624726d9e6becbae9aa419ef35af7f
2019-10-23 20:57:05+02:00
of: unittest: fix memory leak in unittest_data_add In unittest_data_add, a copy buffer is created via kmemdup. This buffer is leaked if of_fdt_unflatten_tree fails. The release for the unittest_data buffer is added. Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree") Signed-off-by: Navid Emamdoost <[email protected]> Reviewed-by: Frank Rowand <[email protected]> Signed-off-by: Rob Herring <[email protected]>
e13de8fe0d6a51341671bbe384826d527afe8d44
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/e13de8fe0d6a51341671bbe384826d527afe8d44
2019-10-23 14:42:44-05:00
media: usb: fix memory leak in af9005_identify_state In af9005_identify_state when returning -EIO the allocated buffer should be released. Replace the "return -EIO" with assignment into ret and move deb_info() under a check. Fixes: af4e067e1dcf ("V4L/DVB (5625): Add support for the AF9005 demodulator from Afatech") Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2289adbfa559050d2a38bcd9caac1c18b800e928
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/2289adbfa559050d2a38bcd9caac1c18b800e928
2019-10-24 18:31:51-03:00
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
27d461333459d282ffa4a2bdb6b215a59d493a8f
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/27d461333459d282ffa4a2bdb6b215a59d493a8f
2019-10-25 13:38:19-07:00
ASoC: SOF: Fix memory leak in sof_dfsentry_write In the implementation of sof_dfsentry_write() memory allocated for string is leaked in case of an error. Go to error handling path if the d_name.name is not valid. Fixes: 091c12e1f50c ("ASoC: SOF: debug: add new debugfs entries for IPC flood test") Signed-off-by: Navid Emamdoost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
c0a333d842ef67ac04adc72ff79dc1ccc3dca4ed
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/c0a333d842ef67ac04adc72ff79dc1ccc3dca4ed
2019-10-28 13:10:23+00:00
ASoC: SOF: ipc: Fix memory leak in sof_set_get_large_ctrl_data In the implementation of sof_set_get_large_ctrl_data() there is a memory leak in case an error. Release partdata if sof_get_ctrl_copy_params() fails. Fixes: 54d198d5019d ("ASoC: SOF: Propagate sof_get_ctrl_copy_params() error properly") Signed-off-by: Navid Emamdoost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
45c1380358b12bf2d1db20a5874e9544f56b34ab
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/45c1380358b12bf2d1db20a5874e9544f56b34ab
2019-10-28 13:10:42+00:00
wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle In the implementation of i2400m_op_rfkill_sw_toggle() the allocated buffer for cmd should be released before returning. The documentation for i2400m_msg_to_dev() says when it returns the buffer can be reused. Meaning cmd should be released in either case. Move kfree(cmd) before return to be reached by all execution paths. Fixes: 2507e6ab7a9a ("wimax: i2400: fix memory leak") Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: David S. Miller <[email protected]>
6f3ef5c25cc762687a7341c18cbea5af54461407
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/6f3ef5c25cc762687a7341c18cbea5af54461407
2019-10-29 16:20:25-07:00
can: gs_usb: gs_can_open(): prevent memory leak In gs_can_open() if usb_submit_urb() fails the allocated urb should be released. Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices") Cc: linux-stable <[email protected]> Signed-off-by: Navid Emamdoost <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
fb5be6a7b4863ecc44963bb80ca614584b6c7817
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/fb5be6a7b4863ecc44963bb80ca614584b6c7817
2019-11-04 21:47:20+01:00
ALSA: timer: Fix incorrectly assigned timer instance The clean up commit 41672c0c24a6 ("ALSA: timer: Simplify error path in snd_timer_open()") unified the error handling code paths with the standard goto, but it introduced a subtle bug: the timer instance is stored in snd_timer_open() incorrectly even if it returns an error. This may eventually lead to UAF, as spotted by fuzzer. The culprit is the snd_timer_open() code checks the SNDRV_TIMER_IFLG_EXCLUSIVE flag with the common variable timeri. This variable is supposed to be the newly created instance, but we (ab-)used it for a temporary check before the actual creation of a timer instance. After that point, there is another check for the max number of instances, and it bails out if over the threshold. Before the refactoring above, it worked fine because the code returned directly from that point. After the refactoring, however, it jumps to the unified error path that stores the timeri variable in return -- even if it returns an error. Unfortunately this stored value is kept in the caller side (snd_timer_user_tselect()) in tu->timeri. This causes inconsistency later, as if the timer was successfully assigned. In this patch, we fix it by not re-using timeri variable but a temporary variable for testing the exclusive connection, so timeri remains NULL at that point. Fixes: 41672c0c24a6 ("ALSA: timer: Simplify error path in snd_timer_open()") Reported-and-tested-by: Tristan Madani <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
e7af6307a8a54f0b873960b32b6a644f2d0fbd97
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/e7af6307a8a54f0b873960b32b6a644f2d0fbd97
2019-11-06 17:58:28+01:00
ext4: add more paranoia checking in ext4_expand_extra_isize handling It's possible to specify a non-zero s_want_extra_isize via debugging option, and this can cause bad things(tm) to happen when using a file system with an inode size of 128 bytes. Add better checking when the file system is mounted, as well as when we are actually doing the trying to do the inode expansion. Link: https://lore.kernel.org/r/[email protected] Reported-by: [email protected] Reported-by: [email protected] Reported-by: [email protected] Signed-off-by: Theodore Ts'o <[email protected]> Cc: [email protected]
4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a
2019-11-19 12:24:55-05:00
x86/fpu: Don't cache access to fpu_fpregs_owner_ctx The state/owner of the FPU is saved to fpu_fpregs_owner_ctx by pointing to the context that is currently loaded. It never changed during the lifetime of a task - it remained stable/constant. After deferred FPU registers loading until return to userland was implemented, the content of fpu_fpregs_owner_ctx may change during preemption and must not be cached. This went unnoticed for some time and was now noticed, in particular since gcc 9 is caching that load in copy_fpstate_to_sigframe() and reusing it in the retry loop: copy_fpstate_to_sigframe() load fpu_fpregs_owner_ctx and save on stack fpregs_lock() copy_fpregs_to_sigframe() /* failed */ fpregs_unlock() *** PREEMPTION, another uses FPU, changes fpu_fpregs_owner_ctx *** fault_in_pages_writeable() /* succeed, retry */ fpregs_lock() __fpregs_load_activate() fpregs_state_valid() /* uses fpu_fpregs_owner_ctx from stack */ copy_fpregs_to_sigframe() /* succeeds, random FPU content */ This is a comparison of the assembly produced by gcc 9, without vs with this patch: | # arch/x86/kernel/fpu/signal.c:173: if (!access_ok(buf, size)) | cmpq %rdx, %rax # tmp183, _4 | jb .L190 #, |-# arch/x86/include/asm/fpu/internal.h:512: return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; |-#APP |-# 512 "arch/x86/include/asm/fpu/internal.h" 1 |- movq %gs:fpu_fpregs_owner_ctx,%rax #, pfo_ret__ |-# 0 "" 2 |-#NO_APP |- movq %rax, -88(%rbp) # pfo_ret__, %sfp … |-# arch/x86/include/asm/fpu/internal.h:512: return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; |- movq -88(%rbp), %rcx # %sfp, pfo_ret__ |- cmpq %rcx, -64(%rbp) # pfo_ret__, %sfp |+# arch/x86/include/asm/fpu/internal.h:512: return fpu == this_cpu_read(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; |+#APP |+# 512 "arch/x86/include/asm/fpu/internal.h" 1 |+ movq %gs:fpu_fpregs_owner_ctx(%rip),%rax # fpu_fpregs_owner_ctx, pfo_ret__ |+# 0 "" 2 |+# arch/x86/include/asm/fpu/internal.h:512: return fpu == this_cpu_read(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; |+#NO_APP |+ cmpq %rax, -64(%rbp) # pfo_ret__, %sfp Use this_cpu_read() instead this_cpu_read_stable() to avoid caching of fpu_fpregs_owner_ctx during preemption points. The Fixes: tag points to the commit where deferred FPU loading was added. Since this commit, the compiler is no longer allowed to move the load of fpu_fpregs_owner_ctx somewhere else / outside of the locked section. A task preemption will change its value and stale content will be observed. [ bp: Massage. ] Debugged-by: Austin Clements <[email protected]> Debugged-by: David Chase <[email protected]> Debugged-by: Ian Lance Taylor <[email protected]> Fixes: 5f409e20b7945 ("x86/fpu: Defer FPU state load until return to userspace") Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Rik van Riel <[email protected]> Tested-by: Borislav Petkov <[email protected]> Cc: Aubrey Li <[email protected]> Cc: Austin Clements <[email protected]> Cc: Barret Rhoden <[email protected]> Cc: Dave Hansen <[email protected]> Cc: David Chase <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: [email protected] Cc: Ingo Molnar <[email protected]> Cc: Josh Bleecher Snyder <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: x86-ml <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Link: https://bugzilla.kernel.org/show_bug.cgi?id=205663
59c4bd853abcea95eccc167a7d7fd5f1a5f47b98
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/59c4bd853abcea95eccc167a7d7fd5f1a5f47b98
2019-11-28 10:16:46+01:00
can: kvaser_usb: kvaser_usb_leaf: Fix some info-leaks to USB devices Uninitialized Kernel memory can leak to USB devices. Fix this by using kzalloc() instead of kmalloc(). Signed-off-by: Xiaolong Huang <[email protected]> Fixes: 7259124eac7d ("can: kvaser_usb: Split driver into kvaser_usb_core.c and kvaser_usb_leaf.c") Cc: linux-stable <[email protected]> # >= v4.19 Signed-off-by: Marc Kleine-Budde <[email protected]>
da2311a6385c3b499da2ed5d9be59ce331fa93e9
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/da2311a6385c3b499da2ed5d9be59ce331fa93e9
2019-12-08 12:22:01+01:00
Input: add safety guards to input_set_keycode() If we happen to have a garbage in input device's keycode table with values too big we'll end up doing clear_bit() with offset way outside of our bitmaps, damaging other objects within an input device or even outside of it. Let's add sanity checks to the returned old keycodes. Reported-by: [email protected] Reported-by: [email protected] Link: https://lore.kernel.org/r/20191207212757.GA245964@dtor-ws Signed-off-by: Dmitry Torokhov <[email protected]>
cb222aed03d798fc074be55e59d9a112338ee784
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/cb222aed03d798fc074be55e59d9a112338ee784
2019-12-13 15:00:42-08:00
scsi: mptfusion: Fix double fetch bug in ioctl Tom Hatskevich reported that we look up "iocp" then, in the called functions we do a second copy_from_user() and look it up again. The problem that could cause is: drivers/message/fusion/mptctl.c 674 /* All of these commands require an interrupt or 675 * are unknown/illegal. 676 */ 677 if ((ret = mptctl_syscall_down(iocp, nonblock)) != 0) ^^^^ We take this lock. 678 return ret; 679 680 if (cmd == MPTFWDOWNLOAD) 681 ret = mptctl_fw_download(arg); ^^^ Then the user memory changes and we look up "iocp" again but a different one so now we are holding the incorrect lock and have a race condition. 682 else if (cmd == MPTCOMMAND) 683 ret = mptctl_mpt_command(arg); The security impact of this bug is not as bad as it could have been because these operations are all privileged and root already has enormous destructive power. But it's still worth fixing. This patch passes the "iocp" pointer to the functions to avoid the second lookup. That deletes 100 lines of code from the driver so it's a nice clean up as well. Link: https://lore.kernel.org/r/20200114123414.GA7957@kadam Reported-by: Tom Hatskevich <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
28d76df18f0ad5bcf5fa48510b225f0ed262a99b
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/28d76df18f0ad5bcf5fa48510b225f0ed262a99b
2020-01-15 23:05:52-05:00
do_last(): fetch directory ->i_mode and ->i_uid before it's too late may_create_in_sticky() call is done when we already have dropped the reference to dir. Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files) Signed-off-by: Al Viro <[email protected]>
d0cb50185ae942b03c4327be322055d622dc79f6
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/d0cb50185ae942b03c4327be322055d622dc79f6
2020-01-26 09:31:07-05:00
mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status() mwifiex_ret_wmm_get_status() calls memcpy() without checking the destination size.Since the source is given from remote AP which contains illegal wmm elements , this may trigger a heap buffer overflow. Fix it by putting the length check before calling memcpy(). Signed-off-by: Qing Xu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
3a9b153c5591548612c3955c9600a98150c81875
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/3a9b153c5591548612c3955c9600a98150c81875
2020-01-27 16:34:33+02:00
mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv() mwifiex_cmd_append_vsie_tlv() calls memcpy() without checking the destination size may trigger a buffer overflower, which a local user could use to cause denial of service or the execution of arbitrary code. Fix it by putting the length check before calling memcpy(). Signed-off-by: Qing Xu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
b70261a288ea4d2f4ac7cd04be08a9f0f2de4f4d
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/b70261a288ea4d2f4ac7cd04be08a9f0f2de4f4d
2020-01-27 16:34:34+02:00
floppy: check FDC index for errors before assigning it Jordy Zomer reported a KASAN out-of-bounds read in the floppy driver in wait_til_ready(). Which on the face of it can't happen, since as Willy Tarreau points out, the function does no particular memory access. Except through the FDCS macro, which just indexes a static allocation through teh current fdc, which is always checked against N_FDC. Except the checking happens after we've already assigned the value. The floppy driver is a disgrace (a lot of it going back to my original horrd "design"), and has no real maintainer. Nobody has the hardware, and nobody really cares. But it still gets used in virtual environment because it's one of those things that everybody supports. The whole thing should be re-written, or at least parts of it should be seriously cleaned up. The 'current fdc' index, which is used by the FDCS macro, and which is often shadowed by a local 'fdc' variable, is a prime example of how not to write code. But because nobody has the hardware or the motivation, let's just fix up the immediate problem with a nasty band-aid: test the fdc index before actually assigning it to the static 'fdc' variable. Reported-by: Jordy Zomer <[email protected]> Cc: Willy Tarreau <[email protected]> Cc: Dan Carpenter <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2e90ca68b0d2f5548804f22f0dd61145516171e3
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/2e90ca68b0d2f5548804f22f0dd61145516171e3
2020-02-24 11:25:33-08:00
xfs: add agf freeblocks verify in xfs_agf_verify We recently used fuzz(hydra) to test XFS and automatically generate tmp.img(XFS v5 format, but some metadata is wrong) xfs_repair information(just one AG): agf_freeblks 0, counted 3224 in ag 0 agf_longest 536874136, counted 3224 in ag 0 sb_fdblocks 613, counted 3228 Test as follows: mount tmp.img tmpdir cp file1M tmpdir sync In 4.19-stable, sync will stuck, the reason is: xfs_mountfs xfs_check_summary_counts if ((!xfs_sb_version_haslazysbcount(&mp->m_sb) || XFS_LAST_UNMOUNT_WAS_CLEAN(mp)) && !xfs_fs_has_sickness(mp, XFS_SICK_FS_COUNTERS)) return 0; -->just return, incore sb_fdblocks still be 613 xfs_initialize_perag_data cp file1M tmpdir -->ok(write file to pagecache) sync -->stuck(write pagecache to disk) xfs_map_blocks xfs_iomap_write_allocate while (count_fsb != 0) { nimaps = 0; while (nimaps == 0) { --> endless loop nimaps = 1; xfs_bmapi_write(..., &nimaps) --> nimaps becomes 0 again xfs_bmapi_write xfs_bmap_alloc xfs_bmap_btalloc xfs_alloc_vextent xfs_alloc_fix_freelist xfs_alloc_space_available -->fail(agf_freeblks is 0) In linux-next, sync not stuck, cause commit c2b3164320b5 ("xfs: use the latest extent at writeback delalloc conversion time") remove the above while, dmesg is as follows: [ 55.250114] XFS (loop0): page discard on page ffffea0008bc7380, inode 0x1b0c, offset 0. Users do not know why this page is discard, the better soultion is: 1. Like xfs_repair, make sure sb_fdblocks is equal to counted (xfs_initialize_perag_data did this, who is not called at this mount) 2. Add agf verify, if fail, will tell users to repair This patch use the second soultion. Signed-off-by: Zheng Bin <[email protected]> Signed-off-by: Ren Xudong <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
d0c7feaf87678371c2c09b3709400be416b2dc62
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/d0c7feaf87678371c2c09b3709400be416b2dc62
2020-03-02 20:55:50-08:00
mt76: fix array overflow on receiving too many fragments for a packet If the hardware receives an oversized packet with too many rx fragments, skb_shinfo(skb)->frags can overflow and corrupt memory of adjacent pages. This becomes especially visible if it corrupts the freelist pointer of a slab page. Cc: [email protected] Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
b102f0c522cf668c8382c56a4f771b37d011cda2
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/b102f0c522cf668c8382c56a4f771b37d011cda2
2020-03-03 17:30:25+02:00
media: ov519: add missing endpoint sanity checks Make sure to check that we have at least one endpoint before accessing the endpoint array to avoid dereferencing a NULL-pointer on stream start. Note that these sanity checks are not redundant as the driver is mixing looking up altsettings by index and by number, which need not coincide. Fixes: 1876bb923c98 ("V4L/DVB (12079): gspca_ov519: add support for the ov511 bridge") Fixes: b282d87332f5 ("V4L/DVB (12080): gspca_ov519: Fix ov518+ with OV7620AE (Trust spacecam 320)") Cc: stable <[email protected]> # 2.6.31 Cc: Hans de Goede <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
998912346c0da53a6dbb71fab3a138586b596b30
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/998912346c0da53a6dbb71fab3a138586b596b30
2020-03-12 17:25:51+01:00
media: stv06xx: add missing descriptor sanity checks Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does not have the expected descriptors. Note that the sanity checks in stv06xx_start() and pb0100_start() are not redundant as the driver is mixing looking up altsettings by index and by number, which may not coincide. Fixes: 8668d504d72c ("V4L/DVB (12082): gspca_stv06xx: Add support for st6422 bridge and sensor") Fixes: c0b33bdc5b8d ("[media] gspca-stv06xx: support bandwidth changing") Cc: stable <[email protected]> # 2.6.31 Cc: Hans de Goede <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
485b06aadb933190f4bc44e006076bc27a23f205
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/485b06aadb933190f4bc44e006076bc27a23f205
2020-03-12 17:26:42+01:00
media: xirlink_cit: add missing descriptor sanity checks Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does not have the expected descriptors. Note that the sanity check in cit_get_packet_size() is not redundant as the driver is mixing looking up altsettings by index and by number, which may not coincide. Fixes: 659fefa0eb17 ("V4L/DVB: gspca_xirlink_cit: Add support for camera with a bcd version of 0.01") Fixes: 59f8b0bf3c12 ("V4L/DVB: gspca_xirlink_cit: support bandwidth changing for devices with 1 alt setting") Cc: stable <[email protected]> # 2.6.37 Cc: Hans de Goede <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
a246b4d547708f33ff4d4b9a7a5dbac741dc89d8
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/a246b4d547708f33ff4d4b9a7a5dbac741dc89d8
2020-03-12 17:27:07+01:00
net_sched: cls_route: remove the right filter from hashtable route4_change() allocates a new filter and copies values from the old one. After the new filter is inserted into the hash table, the old filter should be removed and freed, as the final step of the update. However, the current code mistakenly removes the new one. This looks apparently wrong to me, and it causes double "free" and use-after-free too, as reported by syzbot. Reported-and-tested-by: [email protected] Reported-and-tested-by: [email protected] Reported-and-tested-by: [email protected] Fixes: 1109c00547fc ("net: sched: RCU cls_route") Cc: Jamal Hadi Salim <[email protected]> Cc: Jiri Pirko <[email protected]> Cc: John Fastabend <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
ef299cc3fa1a9e1288665a9fdc8bff55629fd359
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/ef299cc3fa1a9e1288665a9fdc8bff55629fd359
2020-03-16 01:59:32-07:00
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In addition, considering the bfqq may be in race, we should firstly check whether bfqq is in service before doing something on it in bfq_idle_slice_timer_body func. If the bfqq in race is not in service, it means the bfqq has been expired through __bfq_bfqq_expire func, and wait_request flags has been cleared in __bfq_bfqd_reset_in_service func. So we do not need to re-clear the wait_request of bfqq which is not in service. KASAN log is given as follows: [13058.354613] ================================================================== [13058.354640] BUG: KASAN: use-after-free in bfq_idle_slice_timer+0xac/0x290 [13058.354644] Read of size 8 at addr ffffa02cf3e63f78 by task fork13/19767 [13058.354646] [13058.354655] CPU: 96 PID: 19767 Comm: fork13 [13058.354661] Call trace: [13058.354667] dump_backtrace+0x0/0x310 [13058.354672] show_stack+0x28/0x38 [13058.354681] dump_stack+0xd8/0x108 [13058.354687] print_address_description+0x68/0x2d0 [13058.354690] kasan_report+0x124/0x2e0 [13058.354697] __asan_load8+0x88/0xb0 [13058.354702] bfq_idle_slice_timer+0xac/0x290 [13058.354707] __hrtimer_run_queues+0x298/0x8b8 [13058.354710] hrtimer_interrupt+0x1b8/0x678 [13058.354716] arch_timer_handler_phys+0x4c/0x78 [13058.354722] handle_percpu_devid_irq+0xf0/0x558 [13058.354731] generic_handle_irq+0x50/0x70 [13058.354735] __handle_domain_irq+0x94/0x110 [13058.354739] gic_handle_irq+0x8c/0x1b0 [13058.354742] el1_irq+0xb8/0x140 [13058.354748] do_wp_page+0x260/0xe28 [13058.354752] __handle_mm_fault+0x8ec/0x9b0 [13058.354756] handle_mm_fault+0x280/0x460 [13058.354762] do_page_fault+0x3ec/0x890 [13058.354765] do_mem_abort+0xc0/0x1b0 [13058.354768] el0_da+0x24/0x28 [13058.354770] [13058.354773] Allocated by task 19731: [13058.354780] kasan_kmalloc+0xe0/0x190 [13058.354784] kasan_slab_alloc+0x14/0x20 [13058.354788] kmem_cache_alloc_node+0x130/0x440 [13058.354793] bfq_get_queue+0x138/0x858 [13058.354797] bfq_get_bfqq_handle_split+0xd4/0x328 [13058.354801] bfq_init_rq+0x1f4/0x1180 [13058.354806] bfq_insert_requests+0x264/0x1c98 [13058.354811] blk_mq_sched_insert_requests+0x1c4/0x488 [13058.354818] blk_mq_flush_plug_list+0x2d4/0x6e0 [13058.354826] blk_flush_plug_list+0x230/0x548 [13058.354830] blk_finish_plug+0x60/0x80 [13058.354838] read_pages+0xec/0x2c0 [13058.354842] __do_page_cache_readahead+0x374/0x438 [13058.354846] ondemand_readahead+0x24c/0x6b0 [13058.354851] page_cache_sync_readahead+0x17c/0x2f8 [13058.354858] generic_file_buffered_read+0x588/0xc58 [13058.354862] generic_file_read_iter+0x1b4/0x278 [13058.354965] ext4_file_read_iter+0xa8/0x1d8 [ext4] [13058.354972] __vfs_read+0x238/0x320 [13058.354976] vfs_read+0xbc/0x1c0 [13058.354980] ksys_read+0xdc/0x1b8 [13058.354984] __arm64_sys_read+0x50/0x60 [13058.354990] el0_svc_common+0xb4/0x1d8 [13058.354994] el0_svc_handler+0x50/0xa8 [13058.354998] el0_svc+0x8/0xc [13058.354999] [13058.355001] Freed by task 19731: [13058.355007] __kasan_slab_free+0x120/0x228 [13058.355010] kasan_slab_free+0x10/0x18 [13058.355014] kmem_cache_free+0x288/0x3f0 [13058.355018] bfq_put_queue+0x134/0x208 [13058.355022] bfq_exit_icq_bfqq+0x164/0x348 [13058.355026] bfq_exit_icq+0x28/0x40 [13058.355030] ioc_exit_icq+0xa0/0x150 [13058.355035] put_io_context_active+0x250/0x438 [13058.355038] exit_io_context+0xd0/0x138 [13058.355045] do_exit+0x734/0xc58 [13058.355050] do_group_exit+0x78/0x220 [13058.355054] __wake_up_parent+0x0/0x50 [13058.355058] el0_svc_common+0xb4/0x1d8 [13058.355062] el0_svc_handler+0x50/0xa8 [13058.355066] el0_svc+0x8/0xc [13058.355067] [13058.355071] The buggy address belongs to the object at ffffa02cf3e63e70#012 which belongs to the cache bfq_queue of size 464 [13058.355075] The buggy address is located 264 bytes inside of#012 464-byte region [ffffa02cf3e63e70, ffffa02cf3e64040) [13058.355077] The buggy address belongs to the page: [13058.355083] page:ffff7e80b3cf9800 count:1 mapcount:0 mapping:ffff802db5c90780 index:0xffffa02cf3e606f0 compound_mapcount: 0 [13058.366175] flags: 0x2ffffe0000008100(slab|head) [13058.370781] raw: 2ffffe0000008100 ffff7e80b53b1408 ffffa02d730c1c90 ffff802db5c90780 [13058.370787] raw: ffffa02cf3e606f0 0000000000370023 00000001ffffffff 0000000000000000 [13058.370789] page dumped because: kasan: bad access detected [13058.370791] [13058.370792] Memory state around the buggy address: [13058.370797] ffffa02cf3e63e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fb fb [13058.370801] ffffa02cf3e63e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [13058.370805] >ffffa02cf3e63f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [13058.370808] ^ [13058.370811] ffffa02cf3e63f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [13058.370815] ffffa02cf3e64000: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [13058.370817] ================================================================== [13058.370820] Disabling lock debugging due to kernel taint Here, we directly pass the bfqd to bfq_idle_slice_timer_body func. -- V2->V3: rewrite the comment as suggested by Paolo Valente V1->V2: add one comment, and add Fixes and Reported-by tag. Fixes: aee69d78d ("block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler") Acked-by: Paolo Valente <[email protected]> Reported-by: Wang Wang <[email protected]> Signed-off-by: Zhiqiang Liu <[email protected]> Signed-off-by: Feilong Lin <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
2020-03-21 14:29:44-06:00
slcan: Don't transmit uninitialized stack data in padding struct can_frame contains some padding which is not explicitly zeroed in slc_bump. This uninitialized data will then be transmitted if the stack initialization hardening feature is not enabled (CONFIG_INIT_STACK_ALL). This commit just zeroes the whole struct including the padding. Signed-off-by: Richard Palethorpe <[email protected]> Fixes: a1044e36e457 ("can: add slcan driver for serial/USB-serial CAN adapters") Reviewed-by: Kees Cook <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Marc Kleine-Budde <[email protected]> Signed-off-by: David S. Miller <[email protected]>
b9258a2cece4ec1f020715fe3554bc2e360f6264
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/b9258a2cece4ec1f020715fe3554bc2e360f6264
2020-04-01 11:22:35-07:00
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED Using an empty (malformed) nodelist that is not caught during mount option parsing leads to a stack-out-of-bounds access. The option string that was used was: "mpol=prefer:,". However, MPOL_PREFERRED requires a single node number, which is not being provided here. Add a check that 'nodes' is not empty after parsing for MPOL_PREFERRED's nodeid. Fixes: 095f1fc4ebf3 ("mempolicy: rework shmem mpol parsing and display") Reported-by: Entropy Moe <[email protected]> Reported-by: [email protected] Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Tested-by: [email protected] Cc: Lee Schermerhorn <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd
2020-04-02 09:35:32-07:00
xsk: Add missing check on user supplied headroom size Add a check that the headroom cannot be larger than the available space in the chunk. In the current code, a malicious user can set the headroom to a value larger than the chunk size minus the fixed XDP headroom. That way packets with a length larger than the supported size in the umem could get accepted and result in an out-of-bounds write. Fixes: c0c77d8fb787 ("xsk: add user memory registration support sockopt") Reported-by: Bui Quang Minh <[email protected]> Signed-off-by: Magnus Karlsson <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://bugzilla.kernel.org/show_bug.cgi?id=207225 Link: https://lore.kernel.org/bpf/[email protected]
99e3a236dd43d06c65af0a2ef9cb44306aef6e02
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/99e3a236dd43d06c65af0a2ef9cb44306aef6e02
2020-04-15 13:07:18+02:00
USB: core: Fix free-while-in-use bug in the USB S-Glibrary FuzzUSB (a variant of syzkaller) found a free-while-still-in-use bug in the USB scatter-gather library: BUG: KASAN: use-after-free in atomic_read include/asm-generic/atomic-instrumented.h:26 [inline] BUG: KASAN: use-after-free in usb_hcd_unlink_urb+0x5f/0x170 drivers/usb/core/hcd.c:1607 Read of size 4 at addr ffff888065379610 by task kworker/u4:1/27 CPU: 1 PID: 27 Comm: kworker/u4:1 Not tainted 5.5.11 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 Workqueue: scsi_tmf_2 scmd_eh_abort_handler Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xce/0x128 lib/dump_stack.c:118 print_address_description.constprop.4+0x21/0x3c0 mm/kasan/report.c:374 __kasan_report+0x153/0x1cb mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x152/0x1b0 mm/kasan/generic.c:192 __kasan_check_read+0x11/0x20 mm/kasan/common.c:95 atomic_read include/asm-generic/atomic-instrumented.h:26 [inline] usb_hcd_unlink_urb+0x5f/0x170 drivers/usb/core/hcd.c:1607 usb_unlink_urb+0x72/0xb0 drivers/usb/core/urb.c:657 usb_sg_cancel+0x14e/0x290 drivers/usb/core/message.c:602 usb_stor_stop_transport+0x5e/0xa0 drivers/usb/storage/transport.c:937 This bug occurs when cancellation of the S-G transfer races with transfer completion. When that happens, usb_sg_cancel() may continue to access the transfer's URBs after usb_sg_wait() has freed them. The bug is caused by the fact that usb_sg_cancel() does not take any sort of reference to the transfer, and so there is nothing to prevent the URBs from being deallocated while the routine is trying to use them. The fix is to take such a reference by incrementing the transfer's io->count field while the cancellation is in progres and decrementing it afterward. The transfer's URBs are not deallocated until io->complete is triggered, which happens when io->count reaches zero. Signed-off-by: Alan Stern <[email protected]> Reported-and-tested-by: Kyungtae Kim <[email protected]> CC: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
056ad39ee9253873522f6469c3364964a322912b
linux
cvefixes
1
https://github.com/torvalds/linux
https://github.com/torvalds/linux/commit/056ad39ee9253873522f6469c3364964a322912b
2020-04-16 14:46:00+02:00
heck for account and password expiration
1b1ec5ce75e224bd1755650c18ccdaa6dc53e605
freeradius-server
cvefixes
1
https://github.com/alandekok/freeradius-server
https://github.com/alandekok/freeradius-server/commit/1b1ec5ce75e224bd1755650c18ccdaa6dc53e605
2012-02-07 21:00:38+01:00
decode_entities confused by trailing incomplete entity Mark Martinec reported crashed when running SpamAssassin, given a particular HTML junk mail to parse. The problem was caused by HTML::Parsers decode_entities function confusing itself when it encountered strings with incomplete entities at the end of the string.
b9aae1e43eb2c8e989510187cff0ba3e996f9a4c
html-parser
cvefixes
1
https://github.com/gisle/html-parser
https://github.com/gisle/html-parser/commit/b9aae1e43eb2c8e989510187cff0ba3e996f9a4c
2009-10-22 21:49:23+02:00
Fix security issue reported by someone. someone will get their name attributed for future issues if they bother following procedure.
02c6a2b62ddcb6fa4569a591d3461a156a636305
memcached
cvefixes
1
https://github.com/memcached/memcached
https://github.com/memcached/memcached/commit/02c6a2b62ddcb6fa4569a591d3461a156a636305
2020-03-23 10:16:33-07:00
More changes to mitigate: CVE-2010-3843 CVE-2010-3844
4ef3ede30181eca9add74305ad26dbcb0c3686a0
ettercap
cvefixes
1
https://github.com/ettercap/ettercap
https://github.com/ettercap/ettercap/commit/4ef3ede30181eca9add74305ad26dbcb0c3686a0
2012-08-23 09:16:28-04:00
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
cf1ec146f7c6acdc6697032b3aaafc68ffacdcac
mono
cvefixes
1
https://github.com/mono/mono
https://github.com/mono/mono/commit/cf1ec146f7c6acdc6697032b3aaafc68ffacdcac
2010-11-25 14:23:31-02:00
Implement a reference queue API. * gc.c: A reference queue allows one to queue callbcks for when objects are collected. It allows for safe cleanup of objects that can only be done when it is effectively collected. The major difference with regular finalization is that the collector makes sure the object was collected - and can't be resurrected. * gc-internal.h: Export entrypoints for the new API.
8eb1189099e02372fd45ca1c67230eccf1edddc0
mono
cvefixes
1
https://github.com/mono/mono
https://github.com/mono/mono/commit/8eb1189099e02372fd45ca1c67230eccf1edddc0
2011-02-01 16:52:43+01:00
Don't use finalization to cleanup dynamic methods. * reflection.c: Use a reference queue to cleanup dynamic methods instead of finalization. * runtime.c: Shutdown the dynamic method queue before runtime cleanup begins. * DynamicMethod.cs: No longer finalizable. * icall-def.h: Remove unused dynamic method icall. Fixes #660422
89d1455a80ef13cddee5d79ec00c06055da3085c
mono
cvefixes
1
https://github.com/mono/mono
https://github.com/mono/mono/commit/89d1455a80ef13cddee5d79ec00c06055da3085c
2011-02-01 16:52:43+01:00
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <[email protected]> Ref: CVE-2011-0992
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
mono
cvefixes
1
https://github.com/mono/mono
https://github.com/mono/mono/commit/722f9890f09aadfc37ae479e7d946d5fc5ef7b91
2011-04-06 13:27:40-04:00
bugfix: fixed a memory leak and potential abort condition this could happen if multiple rulesets were used and some output batches contained messages belonging to more than one ruleset. fixes: http://bugzilla.adiscon.com/show_bug.cgi?id=226 fixes: http://bugzilla.adiscon.com/show_bug.cgi?id=218
1ef709cc97d54f74d3fdeb83788cc4b01f4c6a2a
rsyslog
cvefixes
1
https://github.com/rsyslog/rsyslog
https://github.com/rsyslog/rsyslog/commit/1ef709cc97d54f74d3fdeb83788cc4b01f4c6a2a
2011-02-25 14:14:17+01:00
listdir(): reuse a single buffer to store every file name to display Allocating a new buffer for each entry is useless. And as these buffers are allocated on the stack, on systems with a small stack size, with many entries, the limit can easily be reached, causing a stack exhaustion and aborting the user session. Reported by Antonio Morales from the GitHub Security Lab team, thanks!
aea56f4bcb9948d456f3fae4d044fd3fa2e19706
pure-ftpd
cvefixes
1
https://github.com/jedisct1/pure-ftpd
https://github.com/jedisct1/pure-ftpd/commit/aea56f4bcb9948d456f3fae4d044fd3fa2e19706
2019-12-30 17:40:04+01:00
diraliases: always set the tail of the list to NULL Spotted and reported by Antonio Norales from GitHub Security Labs. Thanks!
8d0d42542e2cb7a56d645fbe4d0ef436e38bcefa
pure-ftpd
cvefixes
1
https://github.com/jedisct1/pure-ftpd
https://github.com/jedisct1/pure-ftpd/commit/8d0d42542e2cb7a56d645fbe4d0ef436e38bcefa
2020-02-18 18:36:58+01:00
pure_strcmp(): len(s2) can be > len(s1) Reported by Antonio Morales from GitHub Security Labs, thanks!
bf6fcd4935e95128cf22af5924cdc8fe5c0579da
pure-ftpd
cvefixes
1
https://github.com/jedisct1/pure-ftpd
https://github.com/jedisct1/pure-ftpd/commit/bf6fcd4935e95128cf22af5924cdc8fe5c0579da
2020-02-24 15:28:41+01:00
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
37ad222868e52271905b94afea4fc780d83294b4
pure-ftpd
cvefixes
1
https://github.com/jedisct1/pure-ftpd
https://github.com/jedisct1/pure-ftpd/commit/37ad222868e52271905b94afea4fc780d83294b4
2021-11-23 18:53:59+01:00
Don't interpret file display names as format strings This avoids a segfault when copying/moving files containing "%" formatters in their name. Signed-off-by: Jannis Pohlmann <[email protected]>
03dd312e157d4fa8a11d5fa402706ae5b05806fa
thunar
cvefixes
1
https://github.com/xfce-mirror/thunar
https://github.com/xfce-mirror/thunar/commit/03dd312e157d4fa8a11d5fa402706ae5b05806fa
2011-04-15 14:10:58+02:00
cbs_av1: Fix reading of overlong uvlc codes The specification allows 2^32-1 to be encoded as any number of zeroes greater than 31, followed by a one. This previously failed because the trace code would overflow the array containing the string representation of the bits if there were more than 63 zeroes. Fix that by splitting the trace output into batches, and at the same time move it out of the default path. (While this seems likely to be a specification error, libaom does support it so we probably should as well.) From a test case by keval shah <[email protected]>. Reviewed-by: Michael Niedermayer <[email protected]>
b97a4b658814b2de8b9f2a3bce491c002d34de31
ffmpeg
cvefixes
1
https://github.com/ffmpeg/ffmpeg
https://github.com/ffmpeg/ffmpeg/commit/b97a4b658814b2de8b9f2a3bce491c002d34de31
2018-12-22 18:17:03+00:00
avformat/tty: add probe function
3bce9e9b3ea35c54bacccc793d7da99ea5157532
ffmpeg
cvefixes
1
https://github.com/ffmpeg/ffmpeg
https://github.com/ffmpeg/ffmpeg/commit/3bce9e9b3ea35c54bacccc793d7da99ea5157532
2020-01-29 21:55:47+01:00
avcodec/cbs_jpeg: Check length for SOS Fixes: out of array access Fixes: 19734/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5673507031875584 Fixes: 19353/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5703944462663680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
1812352d767ccf5431aa440123e2e260a4db2726
ffmpeg
cvefixes
1
https://github.com/ffmpeg/ffmpeg
https://github.com/ffmpeg/ffmpeg/commit/1812352d767ccf5431aa440123e2e260a4db2726
2020-03-12 00:14:10+01:00
avformat/vividas: improve extradata packing checks in track_header() Fixes: out of array accesses Fixes: 26622/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-6581200338288640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
27a99e2c7d450fef15594671eef4465c8a166bd7
ffmpeg
cvefixes
1
https://github.com/ffmpeg/ffmpeg
https://github.com/ffmpeg/ffmpeg/commit/27a99e2c7d450fef15594671eef4465c8a166bd7
2020-11-04 23:30:53+01:00
avcodec/exr: Check ymin vs. h Fixes: out of array access Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344 Fixes: 27443/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5631239813595136 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
3e5959b3457f7f1856d997261e6ac672bba49e8b
ffmpeg
cvefixes
1
https://github.com/ffmpeg/ffmpeg
https://github.com/ffmpeg/ffmpeg/commit/3e5959b3457f7f1856d997261e6ac672bba49e8b
2020-11-22 17:45:17+01:00
avcodec/exr: skip bottom clearing loop when its outside the image Fixes: signed integer overflow: 1633771809 * 32960 cannot be represented in type 'int' Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
b0a8b40294ea212c1938348ff112ef1b9bf16bb3
ffmpeg
cvefixes
1
https://github.com/ffmpeg/ffmpeg
https://github.com/ffmpeg/ffmpeg/commit/b0a8b40294ea212c1938348ff112ef1b9bf16bb3
2020-11-22 17:45:17+01:00
avcodec/exr: More strictly check dc_count Fixes: out of array access Fixes: exr/deneme Found-by: Burak Çarıkçı <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777
ffmpeg
cvefixes
1
https://github.com/ffmpeg/ffmpeg
https://github.com/ffmpeg/ffmpeg/commit/26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777
2021-05-27 17:43:40+02:00