freebsd-dev/sys/kern
Mark Johnston 9a7c2de364 realloc: Fix KASAN(9) shadow map updates
When copying from the old buffer to the new buffer, we don't know the
requested size of the old allocation, but only the size of the
allocation provided by UMA.  This value is "alloc".  Because the copy
may access bytes in the old allocation's red zone, we must mark the full
allocation valid in the shadow map.  Do so using the correct size.

Reported by:	kp
Tested by:	kp
Sponsored by:	The FreeBSD Foundation
2021-05-05 17:12:51 -04:00
..
bus_if.m
capabilities.conf
clock_if.m
cpufreq_if.m
device_if.m
firmw.S
genassym.sh
genoffset.c
genoffset.sh
imgact_aout.c
imgact_binmisc.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c ELF coredump: define several useful flags for the coredump operations 2021-05-03 19:13:47 +03:00
imgact_shell.c
init_main.c Stop arming kqueue timers on knote owner suspend or terminate 2021-04-09 23:43:51 +03:00
init_sysent.c
kern_acct.c
kern_alq.c
kern_clock.c
kern_clocksource.c
kern_condvar.c
kern_conf.c Fix several dev_clone callbacks to avoid out-of-bounds reads 2021-03-28 11:08:36 -04:00
kern_cons.c
kern_context.c
kern_cpu.c
kern_cpuset.c domainset: Define additional global policies 2021-04-14 13:03:33 -04:00
kern_ctf.c
kern_descrip.c O_PATH: allow vnode kevent filter on such files 2021-04-15 12:49:18 +03:00
kern_dtrace.c
kern_dump.c
kern_environment.c
kern_et.c
kern_event.c filt_timerexpire: do not iterate over the interval 2021-05-03 19:49:54 +03:00
kern_exec.c execve: Mark exec argument buffers 2021-04-13 17:42:21 -04:00
kern_exit.c
kern_fail.c
kern_ffclock.c
kern_fork.c Stop arming kqueue timers on knote owner suspend or terminate 2021-04-09 23:43:51 +03:00
kern_hhook.c
kern_idle.c
kern_intr.c Use the word "LinuxKPI" instead of "Linux compatibility", to not confuse with 2021-03-10 12:35:16 +01:00
kern_jail.c base: remove if_wg(4) and associated utilities, manpage 2021-03-17 09:14:48 -05:00
kern_kcov.c Generalize bus_space(9) and atomic(9) sanitizer interceptors 2021-03-22 22:21:53 -04:00
kern_khelp.c
kern_kthread.c Set TDP_KTHREAD before calling cpu_fork() and cpu_copy_thread(). 2021-03-12 09:48:20 -08:00
kern_ktr.c
kern_ktrace.c
kern_linker.c Minor style cleanup 2021-04-18 11:14:17 -06:00
kern_lock.c
kern_lockf.c
kern_lockstat.c
kern_loginclass.c
kern_malloc.c realloc: Fix KASAN(9) shadow map updates 2021-05-05 17:12:51 -04:00
kern_mbuf.c
kern_mib.c
kern_module.c
kern_mtxpool.c
kern_mutex.c
kern_ntptime.c
kern_osd.c
kern_physio.c Minor style tidy: if( -> if ( 2021-04-18 11:19:15 -06:00
kern_pmc.c
kern_poll.c
kern_priv.c
kern_proc.c sysctl vm.objects: report backing object and swap use 2021-04-19 21:32:01 +03:00
kern_procctl.c
kern_prot.c
kern_racct.c
kern_rangelock.c
kern_rctl.c
kern_resource.c
kern_rmlock.c rmlock(9): add an RM_DUPOK flag 2021-04-12 11:42:21 -03:00
kern_rwlock.c
kern_sdt.c
kern_sema.c
kern_sendfile.c sendfile: Fix error initialization in sendfile_getobj() 2021-04-02 17:42:38 -04:00
kern_sharedpage.c
kern_shutdown.c
kern_sig.c Add ptrace(PT_COREDUMP) 2021-05-03 19:18:26 +03:00
kern_switch.c
kern_sx.c Minor style cleanup 2021-04-18 11:14:17 -06:00
kern_synch.c
kern_syscalls.c
kern_sysctl.c sysctl_handle_string: do not malloc when SYSCTL_IN cannot fault 2021-04-19 21:32:01 +03:00
kern_tc.c kern: clarify boot time 2021-05-05 12:32:13 -06:00
kern_thr.c
kern_thread.c Add thread_run_flash() helper 2021-05-03 19:13:47 +03:00
kern_time.c realtimer_expire: avoid proc lock recursion when called from itimer_proc_continue() 2021-04-14 10:53:19 +03:00
kern_timeout.c Balance parentheses in sysctl descriptions 2021-04-11 10:30:55 +02:00
kern_tslog.c
kern_ubsan.c
kern_umtx.c
kern_uuid.c
kern_xxx.c
ksched.c
link_elf_obj.c link_elf_obj: Add a case missing from 5e6989ba4f 2021-03-16 15:01:41 -04:00
link_elf.c
linker_if.m
Make.tags.inc
Makefile
makesyscalls.sh
md4c.c
md5c.c
msi_if.m
p1003_1b.c
pic_if.m
posix4_mib.c
sched_4bsd.c
sched_ule.c
serdev_if.m
stack_protector.c
subr_acl_nfs4.c
subr_acl_posix1e.c
subr_asan.c kasan: Use vm_offset_t for the first parameter to kasan_shadow_map() 2021-04-29 11:39:02 -04:00
subr_atomic64.c
subr_autoconf.c config_intrhook: provide config_intrhook_drain 2021-03-11 09:45:10 -07:00
subr_blist.c
subr_boot.c
subr_bufring.c
subr_bus_dma.c
subr_bus.c newbus: style nit (align comments) 2021-04-21 15:37:24 -06:00
subr_busdma_bufalloc.c
subr_capability.c
subr_clock.c
subr_compressor.c
subr_counter.c
subr_coverage.c Generalize bus_space(9) and atomic(9) sanitizer interceptors 2021-03-22 22:21:53 -04:00
subr_csan.c Generalize sanitizer interceptors for memory and string routines 2021-03-24 19:46:22 -04:00
subr_devmap.c
subr_devstat.c Speed up geom_stats_resync in the presence of many devices 2021-03-02 18:33:45 -07:00
subr_disk.c
subr_dummy_vdso_tc.c
subr_early.c
subr_epoch.c
subr_eventhandler.c
subr_fattime.c
subr_filter.c
subr_firmware.c
subr_gtaskqueue.c
subr_hash.c
subr_hints.c
subr_intr.c kern/intr: declare interrupt vectors unsigned 2021-05-03 13:24:30 -04:00
subr_kdb.c
subr_kobj.c newbus: Optimize/Simplify kobj_class_compile_common a little 2021-04-21 15:37:24 -06:00
subr_lock.c lock_delay(9): improve interaction with restrict_starvation 2021-04-03 13:08:53 +01:00
subr_log.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c
subr_pcpu.c
subr_pctrie.c
subr_physmem.c
subr_pidctrl.c
subr_power.c
subr_prf.c
subr_prng.c
subr_prof.c x86: remove gcov kernel support 2021-04-02 15:41:51 +03:00
subr_rangeset.c
subr_rman.c
subr_rtc.c
subr_sbuf.c sbuf_uionew(): sbuf_new() takes int as length 2021-04-14 10:23:20 +03:00
subr_scanf.c
subr_sfbuf.c
subr_sglist.c
subr_sleepqueue.c Add sleepq_remove_nested() 2021-05-03 19:13:47 +03:00
subr_smp.c smp: Initialize arg->cpus sooner in smp_rendezvous_cpus_retry() 2021-05-03 13:24:30 -04:00
subr_smr.c
subr_stack.c
subr_stats.c stats(3): Improve t-digest merging of samples which result in mu adjustment underflow. 2021-04-02 13:17:53 +11:00
subr_syscall.c
subr_taskqueue.c
subr_terminal.c
subr_trap.c
subr_turnstile.c
subr_uio.c
subr_unit.c
subr_vmem.c
subr_witness.c Remove more remnants of sio(4) 2021-04-07 14:33:02 -04:00
sys_capability.c
sys_eventfd.c
sys_generic.c
sys_getrandom.c
sys_pipe.c pipe: Avoid calling selrecord() on a closing pipe 2021-04-28 10:43:29 -04:00
sys_procdesc.c
sys_process.c Add ptrace(PT_COREDUMP) 2021-05-03 19:18:26 +03:00
sys_socket.c Re-enable network ioctls in capability mode 2021-04-23 09:22:49 -04:00
syscalls.c
syscalls.master
systrace_args.c
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c
tty_compat.c
tty_info.c
tty_inq.c
tty_outq.c Minor style cleanup 2021-04-18 11:14:17 -06:00
tty_pts.c
tty_tty.c
tty_ttydisc.c
tty.c
uipc_accf.c accept_filter: Fix filter parameter handling 2021-03-25 17:55:46 -04:00
uipc_debug.c
uipc_domain.c
uipc_ktls.c ktls: Hide initialization message behind bootverbose 2021-03-05 13:11:02 -05:00
uipc_mbuf2.c
uipc_mbuf.c mbuf: add a way to mark flowid as calculated from the internal headers 2021-03-31 14:38:26 +03:00
uipc_mbufhash.c
uipc_mqueue.c
uipc_sem.c
uipc_shm.c
uipc_sockbuf.c
uipc_socket.c poll(2): Add POLLRDHUP. 2021-04-28 23:00:31 +12:00
uipc_syscalls.c base: remove if_wg(4) and associated utilities, manpage 2021-03-17 09:14:48 -05:00
uipc_usrreq.c capsicum: Limit socket operations in capability mode 2021-04-07 14:32:56 -04:00
vfs_acl.c
vfs_aio.c open(2): Implement O_PATH 2021-04-15 12:48:24 +03:00
vfs_bio.c amd64: Implement a KASAN shadow map 2021-04-13 17:42:20 -04:00
vfs_cache.c cache: remove incomplete lockless lockout support during resize 2021-04-28 19:53:25 +00:00
vfs_cluster.c Minor style tidy: if( -> if ( 2021-04-18 11:19:15 -06:00
vfs_default.c VOP_STAT: Provide a default value for va_gen 2021-05-03 13:24:30 -04:00
vfs_export.c
vfs_extattr.c
vfs_hash.c
vfs_init.c
vfs_lookup.c Make files opened with O_PATH to not block non-forced unmount 2021-04-15 12:48:27 +03:00
vfs_mount.c mount: Disallow mounting over a jail root 2021-04-06 14:49:36 -04:00
vfs_mountroot.c Minor style tidy: if( -> if ( 2021-04-18 11:19:15 -06:00
vfs_subr.c vfs: Add KASAN state transitions for vnodes 2021-04-13 17:42:21 -04:00
vfs_syscalls.c kern_linkat: modify to accept AT_ flags instead of FOLLOW/NOFOLLOW 2021-04-25 14:13:12 +01:00
vfs_vnops.c copy_file_range(2): improve copying of a large hole to EOF 2021-05-02 16:04:27 -07:00
vnode_if.src