Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_kasan.c Create Date:2022-07-28 06:29:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kmalloc_oob_16

Proto:static noinline void __init kmalloc_oob_16(void)

Type:void

Parameter:Nothing

189  struct{u64 words[2];} * ptr1, * ptr2
193  pr_info("kmalloc out-of-bounds for 16-bytes access\n")
194  ptr1 = kmalloc( size of ptr1 - 3, GFP_KERNEL)
195  ptr2 = kmalloc( size of ptr2 , GFP_KERNEL)
196  If Not ptr1 || Not ptr2 Then
197  pr_err("Allocation failed\n")
198  kfree(ptr1)
199  kfree(ptr2)
200  Return
202  ptr1 = ptr2
203  kfree(ptr1)
204  kfree(ptr2)
Caller
NameDescribe
kmalloc_tests_init