# CVE-2023-53349: media: ov2740: Fix memleak in ov2740_init_controls()

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2025-09-17T14:56:40.510Z
- Modified: 2026-06-17T06:44:58.170Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

media: ov2740: Fix memleak in ov2740_init_controls()

There is a kmemleak when testing the media/i2c/ov2740.c with bpf mock
device:

unreferenced object 0xffff8881090e19e0 (size 16):
  comm "51-i2c-ov2740", pid 278, jiffies 4294781584 (age 23.613s)
  hex dump (first 16 bytes):
    00 f3 7c 0b 81 88 ff ff 80 75 6a 09 81 88 ff ff  ..|......uj.....
  backtrace:
    [<000000004e9fad8f>] __kmalloc_node+0x44/0x1b0
    [<0000000039c802f4>] kvmalloc_node+0x34/0x180
    [<000000009b8b5c63>] v4l2_ctrl_handler_init_class+0x11d/0x180
[videodev]
    [<0000000038644056>] ov2740_probe+0x37d/0x84f [ov2740]
    [<0000000092489f59>] i2c_device_probe+0x28d/0x680
    [<000000001038babe>] really_probe+0x17c/0x3f0
    [<0000000098c7af1c>] __driver_probe_device+0xe3/0x170
    [<00000000e1b3dc24>] device_driver_attach+0x34/0x80
    [<000000005a04a34d>] bind_store+0x10b/0x1a0
    [<00000000ce25d4f2>] drv_attr_store+0x49/0x70
    [<000000007d9f4e9a>] sysfs_kf_write+0x8c/0xb0
    [<00000000be6cff0f>] kernfs_fop_write_iter+0x216/0x2e0
    [<0000000031ddb40a>] vfs_write+0x658/0x810
    [<0000000041beecdd>] ksys_write+0xd6/0x1b0
    [<0000000023755840>] do_syscall_64+0x38/0x90
    [<00000000b2cc2da2>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

ov2740_init_controls() won't clean all the allocated resources in fail
path, which may causes the memleaks. Add v4l2_ctrl_handler_free() to
prevent memleak.

(As written by CVE List.)

## Affected

- Linux Linux: from 866edc895171f1256aad3e81dce193447955c202 before a163ee11345d8322321c28bd61631de32455b987; from 866edc895171f1256aad3e81dce193447955c202 before 3969b2ebc66039306f505c7c630c5530800f83c0; from 866edc895171f1256aad3e81dce193447955c202 before fc33380ae06f438b652f66b9370b543976ac8a03; from 866edc895171f1256aad3e81dce193447955c202 before 7c405ee63447f14eefcfe12a18aa749abbd596ea; from 866edc895171f1256aad3e81dce193447955c202 before 2d899592ed7829d0d5140853bac4d58742a6b8af; 5.8 (not affected: before 5.8; from 5.10.173 up to 5.10.*; from 5.15.99 up to 5.15.*; from 6.1.16 up to 6.1.*; from 6.2.3 up to 6.2.*; from 6.3 up to *)
- linux linux_kernel: from 5.8 before 5.10.173; from 5.11 before 5.15.99; from 5.16 before 6.1.16; from 6.2 before 6.2.3

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/a163ee11345d8322321c28bd61631de32455b987> (patch)
- <https://git.kernel.org/stable/c/3969b2ebc66039306f505c7c630c5530800f83c0> (patch)
- <https://git.kernel.org/stable/c/fc33380ae06f438b652f66b9370b543976ac8a03> (patch)
- <https://git.kernel.org/stable/c/7c405ee63447f14eefcfe12a18aa749abbd596ea> (patch)
- <https://git.kernel.org/stable/c/2d899592ed7829d0d5140853bac4d58742a6b8af> (patch)

## Sources

- CVE List: [CVE-2023-53349](https://www.cve.org/CVERecord?id=CVE-2023-53349), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2023-53349](https://nvd.nist.gov/vuln/detail/CVE-2023-53349), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-53349 · Whole record: https://cve.day/CVE-2023-53349.json · Rebuilt by cve.day 2026-11-25T22:58:34.844Z
