-
Notifications
You must be signed in to change notification settings - Fork 923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null Pointer Dereference in build_for_in_iterator #192
Comments
I believe this is caused by vd = &fd->vars[i];
/* do not close top level last result */
if (vd->scope_level == 0 &&
vd->var_name != JS_ATOM__ret_ &&
vd->var_name != JS_ATOM_NULL) {
get_closure_var(ctx, s, fd,
FALSE, i, vd->var_name, FALSE, FALSE,
JS_VAR_NORMAL);
}
https://github.com/bellard/quickjs/blob/master/quickjs.c#L29514-L29515 without it, accessing an uninitialized variable is done without checking, so it crashes. Possible fix: add |
Commit f404980 ("Add fused get_loc0_loc1 opcode") introduced an off-by-one (sometimes negative) array index bug because OP_get_loc1_loc1 replaced OP_get_loc0 as the first OP_FMT_none_loc opcode.
daa35bc new release a057008 added Array.prototype.findLast{Index} and TypeArray.prototype.findLast{index} (initial patch by bnoordhuis) 177af41 fixed duplicate static private setter/getter test b180cd2 Symbol.species is no longer used in TypedArray constructor from a TypedArray e182050 fixed delete super.x error 58f374e reworked set property and fixed corner cases of typed array set property 20a57f9 Implement extended named capture group identifiers (bnoordhuis) 4949d75 Retrieve RegExp 'g' flag in spec conformant way (original patch by bnoordhuis) c4cdd61 fixed lexical scope of 'this' with eval (github issue bellard#192) 26fdf65 Make Date methods argument coercion spec compliant (bnoordhuis) b14d77b fixed negative zero date 55a4878 fixed private field setters (github issue bellard#194) 321dbfa added missing bignum error tests (github issue bellard#159) f87cab0 added String.prototype.at, Array.prototype.at and TypedArray.prototype.at 3106401 keep LTO cdeca4d updated to unicode 15.0.0 94010ed the BigInt support is now always included 03cc5ec fixed js_proxy_isArray stack overflow (github issue bellard#178) 6de52d8 bf_set_ui() fix (github issue bellard#133) 2788d71 updated to Unicode 14.0.0 8516959 updated test262.conf 446099a added Object.hasOwn() b9f5880 fixed invalid Array.prototype.push/unshift optimization git-subtree-dir: quickjs git-subtree-split: daa35bc
See bellard/quickjs#192. (Thanks to @dchest for the proposed fix.)
original issue: bellard/quickjs#192 fix backported from commit: bellard/quickjs@c4cdd61 CVE record: https://www.cve.org/CVERecord?id=CVE-2023-48183
original issue: bellard/quickjs#192 fix backported from commit: bellard/quickjs@c4cdd61 CVE record: https://www.cve.org/CVERecord?id=CVE-2023-48183
QuickJS version:
2788d71
Test case:
Error:
crashed due to null pointer deference,
In function
JSValue build_for_in_iterator(JSContext *ctx, JSValue obj)
, line 15129, thereturns 0.
The text was updated successfully, but these errors were encountered: