In the Linux kernel, the following vulnerability has been resolved: watchqueue: Fix filter limit check In watchqueuesetfilter(), there are a couple of places where we check that the filter type value does not exceed what the typefilter bitmap can hold. One place calculates the number of bits by: if (tf[i].type >= sizeof(wfilter->typefilter) * 8) which is fine, but the second does: if (tf[i].type >= sizeof(wfilter->typefilter) * BITSPERLONG) which is not. This can lead to a couple of out-of-bounds writes due to a too-large type: (1) setbit() on wfilter->typefilter (2) Writing more elements in wfilter->filters[] than we allocated. Fix this by just using the proper WATCHTYPENR instead, which is the number of types we actually know about. The bug may cause an oops looking something like: BUG: KASAN: slab-out-of-bounds in watchqueuesetfilter+0x659/0x740 Write of size 4 at addr ffff88800d2c66bc by task watchqueueoob/611 ... Call Trace: <TASK> dumpstacklvl+0x45/0x59 printaddressdescription.constprop.0+0x1f/0x150 ... kasanreport.cold+0x7f/0x11b ... watchqueuesetfilter+0x659/0x740 ... _x64sysioctl+0x127/0x190 dosyscall64+0x43/0x90 entrySYSCALL64afterhwframe+0x44/0xae Allocated by task 611: kasansavestack+0x1e/0x40 _kasankmalloc+0x81/0xa0 watchqueuesetfilter+0x23a/0x740 _x64sysioctl+0x127/0x190 dosyscall64+0x43/0x90 entrySYSCALL64afterhwframe+0x44/0xae The buggy address belongs to the object at ffff88800d2c66a0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 28 bytes inside of 32-byte region [ffff88800d2c66a0, ffff88800d2c66c0)
{ "binaries": [ { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-buildinfo-5.15.0-1008-intel-iotg" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-cloud-tools-5.15.0-1008-intel-iotg" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-headers-5.15.0-1008-intel-iotg" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-image-unsigned-5.15.0-1008-intel-iotg" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-image-unsigned-5.15.0-1008-intel-iotg-dbgsym" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-intel-iotg-5.15-cloud-tools-5.15.0-1008" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-intel-iotg-5.15-cloud-tools-common" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-intel-iotg-5.15-headers-5.15.0-1008" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-intel-iotg-5.15-tools-5.15.0-1008" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-intel-iotg-5.15-tools-common" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-intel-iotg-5.15-tools-host" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-modules-5.15.0-1008-intel-iotg" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-modules-extra-5.15.0-1008-intel-iotg" }, { "binary_version": "5.15.0-1008.11~20.04.1", "binary_name": "linux-tools-5.15.0-1008-intel-iotg" } ], "availability": "No subscription required" }
{ "binaries": [ { "binary_version": "5.15.0-1007.7", "binary_name": "linux-buildinfo-5.15.0-1007-realtime" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-cloud-tools-5.15.0-1007-realtime" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-headers-5.15.0-1007-realtime" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-image-5.15.0-1007-realtime" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-modules-5.15.0-1007-realtime" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-modules-extra-5.15.0-1007-realtime" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-realtime-cloud-tools-5.15.0-1007" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-realtime-cloud-tools-common" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-realtime-headers-5.15.0-1007" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-realtime-tools-5.15.0-1007" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-realtime-tools-common" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-realtime-tools-host" }, { "binary_version": "5.15.0-1007.7", "binary_name": "linux-tools-5.15.0-1007-realtime" } ], "availability": "Available with Ubuntu Pro: https://ubuntu.com/pro" }