File openat2.patch of Package qemu

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 8469b81878..667aea6a03 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8822,6 +8822,10 @@ static int do_openat2(CPUArchState *cpu_env, abi_long dirfd,
         }
         return ret;
     }
+    if (tswap64(how.flags) >> 32) {
+        return -TARGET_EINVAL;
+    }
+
     pathname = lock_user_string(guest_pathname);
     if (!pathname) {
         return -TARGET_EFAULT;
openSUSE Build Service is sponsored by