nuttx/drivers
dongjiuzhu1 fcf2eb8fcb drivers/sesnros: fix crash because ipc buffer pointer used after free
When the ipc buffer is obtained for the first time due to insufficient space,
it waits due to insufficient ipc buffer.
At this time, if rptun recursively operates the next ipc request, the ipc buffer
will be reused, but it has been released at this time.

0  file_read (filep=filep@entry=0x20596738, buf=buf@entry=0x205d4358, nbytes=1560) at vfs/fs_read.c:86
1  sensor_rpmsg_push_event_one (dev=0x20558f70, dev@entry=0x2058fc80, stub=stub@entry=0x20596720) at sensors/sensor_rpmsg.c:799
2  sensor_rpmsg_alloc_stub (dev=dev@entry=0x2058fc80, ept=ept@entry=0x20558f08, cookie=<optimized out>) at sensors/sensor_rpmsg.c:552
3  sensor_rpmsg_sub_handler (ept=0x20558f08, data=0x204849c0, len=51, src=<optimized out>, priv=0x20558f00) at sensors/sensor_rpmsg.c:993
4  sensor_rpmsg_ept_cb (ept=<optimized out>, data=<optimized out>, len=<optimized out>, src=<optimized out>, priv=0x20558f00) at sensors/sensor_rpmsg.c:1186
5  rpmsg_virtio_rx_callback (vq=<optimized out>) at open-amp/lib/rpmsg/rpmsg_virtio.c:605
6  virtqueue_notification (vq=<optimized out>) at open-amp/lib/virtio/virtqueue.c:711
7  rproc_virtio_notified (vdev=vdev@entry=0x20558c98, notifyid=notifyid@entry=4294967295) at open-amp/lib/remoteproc/remoteproc_virtio.c:433
8  remoteproc_get_notification (rproc=rproc@entry=0x2054ff34, notifyid=notifyid@entry=4294967295) at open-amp/lib/remoteproc/remoteproc.c:1002
9  rptun_worker (arg=0x2054ff30) at rptun/rptun.c:339
10 rptun_notify_wait (rproc=<optimized out>, id=<optimized out>) at rptun/rptun.c:543
11 remoteproc_virtio_notify_wait (priv=<optimized out>, id=<optimized out>) at open-amp/lib/remoteproc/remoteproc.c:907
12 rproc_virtio_notify_wait (vdev=<optimized out>, vq=<optimized out>) at open-amp/lib/remoteproc/remoteproc_virtio.c:176
13 rpmsg_virtio_notify_wait (vq=<optimized out>, rvdev=0x2054ff78) at nuttx/include/openamp/rpmsg_virtio.h:162
14 rpmsg_virtio_get_tx_payload_buffer (rdev=0x2054ff78, len=0x20558f90, wait=<optimized out>) at open-amp/lib/rpmsg/rpmsg_virtio.c:404
15 rpmsg_get_tx_payload_buffer (ept=ept@entry=0x20558f08, len=len@entry=0x20558f90, wait=wait@entry=1) at open-amp/lib/rpmsg/rpmsg.c:207
16 sensor_rpmsg_push_event_one (dev=0x0, dev@entry=0x20590d60, stub=stub@entry=0x20596720) at sensors/sensor_rpmsg.c:783
17 sensor_rpmsg_alloc_stub (dev=dev@entry=0x20590d60, ept=ept@entry=0x20558f08, cookie=<optimized out>) at sensors/sensor_rpmsg.c:552
18 sensor_rpmsg_sub_handler (ept=0x20558f08, data=0x20483700, len=49, src=<optimized out>, priv=0x20558f00) at sensors/sensor_rpmsg.c:993
19 sensor_rpmsg_ept_cb (ept=<optimized out>, data=<optimized out>, len=<optimized out>, src=<optimized out>, priv=0x20558f00) at sensors/sensor_rpmsg.c:1186
20 rpmsg_virtio_rx_callback (vq=<optimized out>) at open-amp/lib/rpmsg/rpmsg_virtio.c:605
21 virtqueue_notification (vq=<optimized out>) at open-amp/lib/virtio/virtqueue.c:711
22 rproc_virtio_notified (vdev=vdev@entry=0x20558c98, notifyid=notifyid@entry=4294967295) at open-amp/lib/remoteproc/remoteproc_virtio.c:433
23 remoteproc_get_notification (rproc=0x2054ff34, rproc, notifyid=notifyid@entry=4294967295)
24 rptun_worker (arg=0x2054ff30) at rptun/rptun.c:339
25 rptun_thread (argc=<optimized out>, argv=<optimized out>) at rptun/rptun.c:375

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-28 11:39:54 +08:00
..
1wire nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
analog Initialize af_channel to ensure no out-of-bounds situations occur 2024-09-27 14:42:45 +08:00
audio drivers/audio: fix samp rate conversion issue 2024-08-27 22:00:39 +08:00
bch drivers/bch: ioctl() - BIOC_FLUSH: Add calling ioctl() of block driver 2024-09-27 00:12:43 +08:00
can can: Merge cd_error and rx_overflow into rx_error 2024-09-27 09:01:06 +08:00
clk clk:optimized the clk_set_rate for mux 2024-09-28 10:38:55 +08:00
contactless nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
coresight math: Optimize the implementation of log2ceil and log2floor 2024-09-23 10:03:54 +02:00
crypto nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
devicetree nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
dma Nuttx/dma: add dma framework for nuttx 2023-04-22 01:02:51 +08:00
dummy build: add initial cmake build system 2023-07-08 13:50:48 +08:00
eeprom nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
efuse nuttx: use lib_free for memory de-allocation after strdup or asprintf 2023-08-08 11:58:29 -03:00
i2c i2c: Optimize access to private data 2024-09-20 13:28:03 +02:00
i2s nuttx: use sizeof instead of define or number in snprintf 2024-08-25 19:22:15 +08:00
i3c drivers/i3c: avoid return error when i3c_master_register without i3c/i2c device 2024-09-24 23:36:50 +08:00
input bits:rename __set_bit to set_bit __clear_bit to clear_bit 2024-09-23 10:03:54 +02:00
ioexpander drivers/gpio: save memory if dont support signal 2024-09-15 11:29:55 +08:00
ipcc nuttx: use sizeof instead of define or number in snprintf 2024-08-25 19:22:15 +08:00
lcd bits:rename __set_bit to set_bit __clear_bit to clear_bit 2024-09-23 10:03:54 +02:00
leds drivers/leds/ws2812: Fix WS2812 pixel size 2023-12-24 16:38:06 -08:00
loop enable O_CLOEXEC explicit 2023-09-22 13:51:00 +08:00
math math/mpi: add mpi driver in math 2023-10-17 13:43:43 +08:00
misc misc/rpmsgdev: Fix invalid pointer error when there are more than one remotes 2024-09-23 23:59:12 +02:00
mmcsd mmcsd: fix cmd6 timeout error when repeat calling 2024-09-27 10:25:51 +08:00
modem drivers/modem/alt1250: Fix issue where the program would get stuck 2024-09-24 20:00:21 +08:00
motor Fix allocated memory test 2024-06-28 09:30:42 +02:00
mtd ftl: should pre-allocate eblock for car case 2024-09-16 10:25:36 +08:00
net vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
note noteram:read noteram may cause crash 2024-09-28 11:08:39 +08:00
pci drivers/pci: one pci device should only associate with one driver 2024-09-27 17:12:09 +08:00
pinctrl driver/pinctl: add pinctrl framework 2024-09-17 02:25:47 +08:00
pipes drivers/pipes: add fcntl(F_SETPIPE_SZ/F_GETPIPE_SZ) support 2024-09-10 11:35:15 +08:00
power feature: charge: Add battery operate 2024-09-28 11:25:17 +08:00
rc nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
regmap drivers/regmap: add exit function interface. 2024-08-27 21:43:58 +08:00
reset drivers/reset: support rpmsg reset 2024-09-15 20:21:41 +08:00
rf build: add initial cmake build system 2023-07-08 13:50:48 +08:00
rmt nuttx: use sizeof instead of define or number in snprintf 2024-08-25 19:22:15 +08:00
rpmsg drivers/rpmsg: replace metal_list_for_each to safety version 2024-09-26 08:36:14 +08:00
rptun rptun/rptun_ivshmem:add restart cmd to reboot slave 2024-09-26 00:04:05 +08:00
segger syslog/channel: add constant attribute if SYSLOG_IOCTL is not enabled 2024-09-26 16:10:29 +08:00
sensors drivers/sesnros: fix crash because ipc buffer pointer used after free 2024-09-28 11:39:54 +08:00
serial PM:use CONFIG_SERIAL_PM_ACTIVITY_PRIORITY == 0 disable pm_activity which need by bl616 2024-09-28 11:03:48 +08:00
spi spi_slave: keep consistent with the parameter of the spi_slave_receive function declaration 2024-09-13 12:27:31 +08:00
syslog ramlog:flush should reset the tail of the reader 2024-09-28 11:08:39 +08:00
thermal Thermal/dummy: Fix depends error 2024-09-23 08:57:29 +08:00
timers clock: Replace all ts and tick conversion functions 2024-09-12 18:14:39 +08:00
usbdev composite.c warning 2024-09-16 10:33:01 +08:00
usbhost nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
usbmisc nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
usbmonitor nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
usrsock rpmsg: make all the rpmsg services deponds on RPMSG 2024-02-18 04:09:34 -08:00
video drivers/fb: add panbuffer clear ioctl 2024-09-13 09:15:38 +08:00
virtio drivers: fix gcc14 errors for virtio 2024-09-16 11:25:40 -03:00
wireless nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
.gitignore build: Remve the unnecessary .gitignore 2020-05-23 18:00:40 +01:00
CMakeLists.txt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
drivers_initialize.c Add thermal framework 2024-09-23 08:57:29 +08:00
Kconfig drivers/i3c: support i3c driver model 2024-09-24 23:36:50 +08:00
Makefile drivers/i3c: support i3c driver model 2024-09-24 23:36:50 +08:00