We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bca9a39 commit fd425f4Copy full SHA for fd425f4
1 file changed
lara/kexploit/darksword.m
@@ -1515,10 +1515,14 @@ uint64_t ds_get_our_task(void) {
1515
1516
bool ds_isvalid(uint64_t value) {
1517
if (!value) {
1518
- return NO;
+ return false;
1519
}
1520
- if (VM_MIN_KERNEL_ADDRESS && VM_MAX_KERNEL_ADDRESS) {
1521
- return value >= VM_MIN_KERNEL_ADDRESS && value <= VM_MAX_KERNEL_ADDRESS;
+
+ uint16_t top_bits = (value >> 48) & 0xFFFF;
1522
1523
+ if (top_bits == 0xFFFF || top_bits == 0xFFFE) {
1524
+ return true;
1525
- return (value & 0xffff000000000000ULL) == 0xffff000000000000ULL;
1526
1527
1528
0 commit comments