linux/include/trace/events
Steven Rostedt (Google) 820b8963ad net: sock: tracing: Fix sock_exceed_buf_limit not to dereference stale pointer
The trace event sock_exceed_buf_limit saves the prot->sysctl_mem pointer
and then dereferences it in the TP_printk() portion. This is unsafe as the
TP_printk() portion is executed at the time the buffer is read. That is,
it can be seconds, minutes, days, months, even years later. If the proto
is freed, then this dereference will can also lead to a kernel crash.

Instead, save the sysctl_mem array into the ring buffer and have the
TP_printk() reference that instead. This is the proper and safe way to
read pointers in trace events.

Link: https://lore.kernel.org/all/20220706052130.16368-12-kuniyu@amazon.com/

Cc: stable@vger.kernel.org
Fixes: 3847ce32ae ("core: add tracepoints for queueing skb to rcvbuf")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-07-08 12:06:17 +01:00
..
9p.h
afs.h
alarmtimer.h
asoc.h
avc.h
bcache.h
block.h block: introduce block_rq_error tracepoint 2022-02-11 10:00:16 -07:00
bpf_test_run.h
bridge.h
btrfs.h Yang Shi has improved the behaviour of khugepaged collapsing of readonly 2022-05-26 12:32:41 -07:00
cachefiles.h cachefiles: add tracepoints for on-demand read mode 2022-05-18 00:11:18 +08:00
cgroup.h
clk.h
cma.h
compaction.h tracing: incorrect gfp_t conversion 2022-05-13 07:20:18 -07:00
context_tracking.h
cpuhp.h
damon.h
devfreq.h
devlink.h
dlm.h
dma_fence.h
erofs.h
error_report.h
ext4.h fs: Remove flags parameter from aops->write_begin 2022-05-08 14:28:19 -04:00
f2fs.h f2fs-for-5.19 2022-05-31 16:52:59 -07:00
fib.h
fib6.h
filelock.h
filemap.h
fs.h
fs_dax.h
fscache.h
fsi.h fsi: Add trace events in initialization path 2022-02-21 19:38:54 +10:30
fsi_master_aspeed.h fsi: Add trace events in initialization path 2022-02-21 19:38:54 +10:30
fsi_master_ast_cf.h
fsi_master_gpio.h
gpio.h
gpu_mem.h
host1x.h
huge_memory.h mm/khugepaged: remove reuse_swap_page() usage 2022-03-24 19:06:51 -07:00
hwmon.h
i2c.h
i2c_slave.h i2c: add tracepoints for I2C slave events 2022-03-20 00:11:05 +01:00
ib_mad.h
ib_umad.h
initcall.h
intel-sst.h
intel_ifs.h trace: platform/x86/intel/ifs: Add trace point to track Intel IFS operations 2022-05-12 15:35:29 +02:00
intel_iommu.h
intel_ish.h
io_uring.h io_uring: move io_uring_get_opcode out of TP_printk 2022-06-23 08:40:36 -06:00
iocost.h
iommu.h
ipi.h
irq.h
irq_matrix.h
iscsi.h
jbd2.h
kmem.h mm/page_alloc: fix tracepoint mm_page_alloc_zone_locked() 2022-05-19 14:08:54 -07:00
kvm.h
kyber.h
libata.h ata: libata: add qc->flags in ata_qc_complete_template tracepoint 2022-06-17 16:30:03 +09:00
lock.h locking/mutex: Make contention tracepoints more consistent wrt adaptive spinning 2022-04-05 10:24:36 +02:00
mce.h
mctp.h mctp: Add SIOCMCTP{ALLOC,DROP}TAG ioctls for tag control 2022-02-09 12:00:11 +00:00
mdio.h
migrate.h mm/migration: add trace events for base page and HugeTLB migrations 2022-03-24 19:06:45 -07:00
mlxsw.h
mmap.h
mmap_lock.h
mmc.h
mmflags.h include/trace/events/mmflags.h: cleanup for "tracing: incorrect gfp_t conversion" 2022-05-25 10:47:47 -07:00
module.h
mptcp.h mptcp: dump infinite_map field in mptcp_dump_mpext 2022-04-23 11:51:05 +01:00
napi.h
nbd.h
neigh.h
net.h net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
net_probe_common.h
netfs.h netfs: Add a function to consolidate beginning a read 2022-03-18 09:29:05 +00:00
netlink.h
nfs.h
nilfs2.h
nmi.h
objagg.h
oom.h
osnoise.h
page_isolation.h
page_pool.h
page_ref.h
pagemap.h
percpu.h include/trace/events/percpu.h: cleanup for "percpu: improve percpu_alloc_percpu event trace" 2022-05-25 10:47:48 -07:00
power.h
power_cpu_migrate.h
preemptirq.h
printk.h
pwc.h
pwm.h
qdisc.h
qla.h
qrtr.h
rcu.h rcu: Refactor rcu_barrier() empty-list handling 2022-02-08 10:12:28 -08:00
rdma.h
rdma_core.h
regulator.h
rpcgss.h
rpcrdma.h
rpm.h
rseq.h
rtc.h
rxrpc.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-23 21:19:17 -07:00
sched.h sched/tracing: Append prev_state to tp args instead 2022-05-12 00:37:11 +02:00
scmi.h
scsi.h
sctp.h
signal.h
siox.h
skb.h tcp: add drop reason support to tcp_ofo_queue() 2022-04-17 13:31:32 +01:00
smbus.h
sock.h net: sock: tracing: Fix sock_exceed_buf_limit not to dereference stale pointer 2022-07-08 12:06:17 +01:00
spi.h
spmi.h
sunrpc.h SUNRPC: Remove svc_rqst::rq_xprt_hlen 2022-05-19 12:25:39 -04:00
sunrpc_base.h
sunvnet.h
swiotlb.h swiotlb: make the swiotlb_init interface more useful 2022-04-18 07:21:11 +02:00
syscalls.h
target.h
task.h
tcp.h tcp: Add tracepoint for tcp_set_ca_state 2022-04-07 20:33:15 -07:00
tegra_apb_dma.h
thermal.h
thermal_power_allocator.h
thermal_pressure.h arch_topology: Trace the update thermal pressure 2022-05-06 09:57:38 +02:00
thp.h mm/migration: add trace events for THP migrations 2022-03-24 19:06:45 -07:00
timer.h tracing/timer: Add missing argument documentation of trace points 2022-04-14 16:14:49 +02:00
tlb.h
udp.h
ufs.h
v4l2.h
vb2.h
vmscan.h tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate 2022-05-19 14:08:55 -07:00
vsock_virtio_transport_common.h
wbt.h
workqueue.h workqueue: Fix type of cpu in trace event 2022-06-07 07:09:47 -10:00
writeback.h remove congestion tracking framework 2022-03-22 15:57:01 -07:00
xdp.h
xen.h