[PATCH] dma-buf: WARN on dmabuf release with pending attachments

2021-07-23 Thread Charan Teja Reddy
as the 'memory leak'. This should at least be reported as the WARN(). Signed-off-by: Charan Teja Reddy --- drivers/dma-buf/dma-buf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 511fe0d..733c8b1 100644 --- a/drivers/dma-buf

[PATCH] dmabuf: fix use-after-free of dmabuf's file->f_inode

2021-01-05 Thread Charan Teja Reddy
ls the d_op->d_release, move the dma_buf's db_list removal from d_release() to f_op->release(). This ensures that dma_buf's file->f_inode is not accessed after it is released. Fixes: 4ab59c3c638c ("dma-buf: Move dma_buf_release() from fops to dentry_ops") Signed-of

[PATCH V2] dmabuf: fix use-after-free of dmabuf's file->f_inode

2021-01-06 Thread Charan Teja Reddy
ls the d_op->d_release, move the dma_buf's db_list removal from d_release() to f_op->release(). This ensures that dma_buf's file->f_inode is not accessed after it is released. Cc: # 5.4+ Fixes: 4ab59c3c638c ("dma-buf: Move dma_buf_release() from fops to dentry

[PATCH v2] dma-buf: fix use-after-free in dmabuffs_dname

2020-05-08 Thread Charan Teja Reddy
fs_open+0xa0/0xd0 path_openat+0x12ee/0x3490 do_filp_open+0x192/0x260 do_sys_openat2+0x5eb/0x7e0 do_sys_open+0xf2/0x180 Fixes: bb2bb9030425 ("dma-buf: add DMA_BUF_SET_NAME ioctls") Reported-by: syzbot+3643a18836bce555b...@syzkaller.appspotmail.com Cc: [5.3+] Signed-off-by: Charan Tej

[PATCH] dmabuf: fix NULL pointer dereference in dma_buf_release()

2020-09-19 Thread Charan Teja Reddy
a_buf_getfile drivers/dma-buf/dma-buf.c:473 [inline] dma_buf_export+0x25c/0x3ec drivers/dma-buf/dma-buf.c:585 Fix this by checking for the valid pointer in the dentry->d_fsdata. Fixes: 4ab59c3c638c ("dma-buf: Move dma_buf_release() from fops to dentry_ops") Cc: [5.7+] Signed