Shared security patch analysis results
AI Used: DEEPSEEK deepseek-chat--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/third_party/rust/blake2b_simd/README.md+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/blake2b_simd/README.md@@ -1,4 +1,4 @@-# blake2b_simd [](https://github.com/oconnor663/blake2_simd) [](https://crates.io/crates/blake2b_simd) [](https://travis-ci.org/oconnor663/blake2_simd)+# blake2b_simd [](https://github.com/oconnor663/blake2_simd) [](https://crates.io/crates/blake2b_simd) [](https://github.com/oconnor663/blake2_simd/actions) An implementation of the BLAKE2b and BLAKE2bp hash functions. See also [`blake2s_simd`](../blake2s).
Analysis of the provided code diff: 1. Vulnerability Existed: no No security vulnerability [third_party/rust/blake2b_simd/README.md] [Lines 1] Old Code: `# blake2b_simd [](https://github.com/oconnor663/blake2_simd) [](https://crates.io/crates/blake2b_simd) [](https://travis-ci.org/oconnor663/blake2_simd)` Fixed Code: `# blake2b_simd [](https://github.com/oconnor663/blake2_simd) [](https://crates.io/crates/blake2b_simd) [](https://github.com/oconnor663/blake2_simd/actions)` The change only updates the build status badge from Travis CI to GitHub Actions. This is purely a CI/CD infrastructure change and doesn't involve any security fixes or vulnerabilities. The functionality of the code remains unchanged.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-tables/height-distribution/percentage-sizing-of-table-cell-children-005.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-tables/height-distribution/percentage-sizing-of-table-cell-children-005.html@@ -3,7 +3,6 @@ <link rel="help" href="https://drafts.csswg.org/css-tables-3/#row-layout"> <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> <link rel="bookmark" href="https://crbug.com/982312" />-<meta name="flags" content="" /> <meta name="assert" content="intrinsic height of a table cell descendant is honored when the descendant and cell both have unresolvable percentage heights and when the descendant has overflow:auto" /> <title>table cell percent height descendant with overflow:auto</title>
Based on the provided diff, I'll analyze it for potential security vulnerabilities: 1. Vulnerability Existed: no Meta Tag Removal [testing/web-platform/tests/css/css-tables/height-distribution/percentage-sizing-of-table-cell-children-005.html] [Lines 3-6] Old Code: ``` <link rel="bookmark" href="https://crbug.com/982312" /> <meta name="flags" content="" /> <meta name="assert" content="intrinsic height of a table cell descendant is honored when the descendant and cell both have unresolvable percentage heights and when the descendant has overflow:auto" /> ``` Fixed Code: ``` <link rel="bookmark" href="https://crbug.com/982312" /> <meta name="assert" content="intrinsic height of a table cell descendant is honored when the descendant and cell both have unresolvable percentage heights and when the descendant has overflow:auto" /> ``` The change simply removes an empty `meta` tag with `name="flags"`. This doesn't appear to be security-related but rather a cleanup of unnecessary markup. There are no obvious security vulnerabilities being fixed in this diff.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.js@@ -13,8 +13,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50);@@ -23,7 +23,7 @@ ctx.roundRect(200, 100, 400, 1000, [0]); ctx.lineTo(-2000, -1000); ctx.stroke();-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided code diff, I don't see any security-related fixes. The changes appear to be purely variable renaming (from `offscreenCanvas` to `canvas`) and don't affect security. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found [File] [Lines 13-14, 23] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); The changes are purely cosmetic/refactoring in nature and don't address any security issues. The functionality remains identical, only the variable name has been changed for consistency or clarity.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/third_party/rust/rust_decimal/src/str.rs+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/third_party/rust/rust_decimal/src/str.rs@@ -1,7 +1,7 @@ use crate::{- constants::{MAX_PRECISION, MAX_STR_BUFFER_SIZE},- error::Error,- ops::array::{add_by_internal, add_one_internal, div_by_u32, is_all_zero, mul_by_10, mul_by_u32},+ constants::{BYTES_TO_OVERFLOW_U64, MAX_PRECISION, MAX_STR_BUFFER_SIZE, OVERFLOW_U96, WILL_OVERFLOW_U64},+ error::{tail_error, Error},+ ops::array::{add_by_internal_flattened, add_one_internal, div_by_u32, is_all_zero, mul_by_u32}, Decimal, };@@ -15,12 +15,12 @@ value: &Decimal, append_sign: bool, precision: Option<usize>,-) -> (ArrayString<[u8; MAX_STR_BUFFER_SIZE]>, Option<usize>) {+) -> (ArrayString<MAX_STR_BUFFER_SIZE>, Option<usize>) { // Get the scale - where we need to put the decimal point let scale = value.scale() as usize; // Convert to a string and manipulate that (neg at front, inject decimal)- let mut chars = ArrayVec::<[_; MAX_STR_BUFFER_SIZE]>::new();+ let mut chars = ArrayVec::<_, MAX_STR_BUFFER_SIZE>::new(); let mut working = value.mantissa_array3(); while !is_all_zero(&working) { let remainder = div_by_u32(&mut working, 10u32);@@ -122,9 +122,248 @@ } // dedicated implementation for the most common case.+#[inline] pub(crate) fn parse_str_radix_10(str: &str) -> Result<Decimal, crate::Error> {+ let bytes = str.as_bytes();+ // handle the sign++ if bytes.len() < BYTES_TO_OVERFLOW_U64 {+ parse_str_radix_10_dispatch::<false>(bytes)+ } else {+ parse_str_radix_10_dispatch::<true>(bytes)+ }+}++#[inline]+fn parse_str_radix_10_dispatch<const BIG: bool>(bytes: &[u8]) -> Result<Decimal, crate::Error> {+ match bytes {+ [b, rest @ ..] => byte_dispatch_u64::<false, false, false, BIG, true>(rest, 0, 0, *b),+ [] => tail_error("Invalid decimal: empty"),+ }+}++#[inline]+fn overflow_64(val: u64) -> bool {+ val >= WILL_OVERFLOW_U64+}++#[inline]+pub fn overflow_128(val: u128) -> bool {+ val >= OVERFLOW_U96+}++#[inline]+fn dispatch_next<const POINT: bool, const NEG: bool, const HAS: bool, const BIG: bool>(+ bytes: &[u8],+ data64: u64,+ scale: u8,+) -> Result<Decimal, crate::Error> {+ if let Some((next, bytes)) = bytes.split_first() {+ byte_dispatch_u64::<POINT, NEG, HAS, BIG, false>(bytes, data64, scale, *next)+ } else {+ handle_data::<NEG, HAS>(data64 as u128, scale)+ }+}++#[inline(never)]+fn non_digit_dispatch_u64<const POINT: bool, const NEG: bool, const HAS: bool, const BIG: bool, const FIRST: bool>(+ bytes: &[u8],+ data64: u64,+ scale: u8,+ b: u8,+) -> Result<Decimal, crate::Error> {+ match b {+ b'-' if FIRST && !HAS => dispatch_next::<false, true, false, BIG>(bytes, data64, scale),+ b'+' if FIRST && !HAS => dispatch_next::<false, false, false, BIG>(bytes, data64, scale),+ b'_' if HAS => handle_separator::<POINT, NEG, BIG>(bytes, data64, scale),+ b => tail_invalid_digit(b),+ }+}++#[inline]+fn byte_dispatch_u64<const POINT: bool, const NEG: bool, const HAS: bool, const BIG: bool, const FIRST: bool>(+ bytes: &[u8],+ data64: u64,+ scale: u8,+ b: u8,+) -> Result<Decimal, crate::Error> {+ match b {+ b'0'..=b'9' => handle_digit_64::<POINT, NEG, BIG>(bytes, data64, scale, b - b'0'),+ b'.' if !POINT => handle_point::<NEG, HAS, BIG>(bytes, data64, scale),+ b => non_digit_dispatch_u64::<POINT, NEG, HAS, BIG, FIRST>(bytes, data64, scale, b),+ }+}++#[inline(never)]+fn handle_digit_64<const POINT: bool, const NEG: bool, const BIG: bool>(+ bytes: &[u8],+ data64: u64,+ scale: u8,+ digit: u8,+) -> Result<Decimal, crate::Error> {+ // we have already validated that we cannot overflow+ let data64 = data64 * 10 + digit as u64;+ let scale = if POINT { scale + 1 } else { 0 };++ if let Some((next, bytes)) = bytes.split_first() {+ let next = *next;+ if POINT && BIG && scale >= 28 {+ maybe_round(data64 as u128, next, scale, POINT, NEG)+ } else if BIG && overflow_64(data64) {+ handle_full_128::<POINT, NEG>(data64 as u128, bytes, scale, next)+ } else {+ byte_dispatch_u64::<POINT, NEG, true, BIG, false>(bytes, data64, scale, next)+ }+ } else {+ let data: u128 = data64 as u128;++ handle_data::<NEG, true>(data, scale)+ }+}++#[inline(never)]+fn handle_point<const NEG: bool, const HAS: bool, const BIG: bool>(+ bytes: &[u8],+ data64: u64,+ scale: u8,+) -> Result<Decimal, crate::Error> {+ dispatch_next::<true, NEG, HAS, BIG>(bytes, data64, scale)+}++#[inline(never)]+fn handle_separator<const POINT: bool, const NEG: bool, const BIG: bool>(+ bytes: &[u8],+ data64: u64,+ scale: u8,+) -> Result<Decimal, crate::Error> {+ dispatch_next::<POINT, NEG, true, BIG>(bytes, data64, scale)+}++#[inline(never)]+#[cold]+fn tail_invalid_digit(digit: u8) -> Result<Decimal, crate::Error> {+ match digit {+ b'.' => tail_error("Invalid decimal: two decimal points"),+ b'_' => tail_error("Invalid decimal: must start lead with a number"),+ _ => tail_error("Invalid decimal: unknown character"),+ }+}++#[inline(never)]+#[cold]+fn handle_full_128<const POINT: bool, const NEG: bool>(+ mut data: u128,+ bytes: &[u8],+ scale: u8,+ next_byte: u8,+) -> Result<Decimal, crate::Error> {+ let b = next_byte;+ match b {+ b'0'..=b'9' => {+ let digit = u32::from(b - b'0');++ // If the data is going to overflow then we should go into recovery mode+ let next = (data * 10) + digit as u128;+ if overflow_128(next) {+ if !POINT {+ return tail_error("Invalid decimal: overflow from too many digits");+ }++ if digit >= 5 {+ data += 1;+ }+ handle_data::<NEG, true>(data, scale)+ } else {+ data = next;+ let scale = scale + POINT as u8;+ if let Some((next, bytes)) = bytes.split_first() {+ let next = *next;+ if POINT && scale >= 28 {+ maybe_round(data, next, scale, POINT, NEG)+ } else {+ handle_full_128::<POINT, NEG>(data, bytes, scale, next)+ }+ } else {+ handle_data::<NEG, true>(data, scale)+ }+ }+ }+ b'.' if !POINT => {+ // This call won't tail?+ if let Some((next, bytes)) = bytes.split_first() {+ handle_full_128::<true, NEG>(data, bytes, scale, *next)+ } else {+ handle_data::<NEG, true>(data, scale)+ }+ }+ b'_' => {+ if let Some((next, bytes)) = bytes.split_first() {+ handle_full_128::<POINT, NEG>(data, bytes, scale, *next)+ } else {+ handle_data::<NEG, true>(data, scale)+ }+ }+ b => tail_invalid_digit(b),+ }+}++#[inline(never)]+#[cold]+fn maybe_round(mut data: u128, next_byte: u8, scale: u8, point: bool, negative: bool) -> Result<Decimal, crate::Error> {+ let digit = match next_byte {+ b'0'..=b'9' => u32::from(next_byte - b'0'),+ b'_' => 0, // this should be an invalid string?+ b'.' if point => 0,+ b => return tail_invalid_digit(b),+ };++ // Round at midpoint+ if digit >= 5 {+ data += 1;+ if overflow_128(data) {+ // Highly unlikely scenario which is more indicative of a bug+ return tail_error("Invalid decimal: overflow when rounding");+ }+ }++ if negative {+ handle_data::<true, true>(data, scale)+ } else {+ handle_data::<false, true>(data, scale)+ }+}++#[inline(never)]+fn tail_no_has() -> Result<Decimal, crate::Error> {+ tail_error("Invalid decimal: no digits found")+}++#[inline]+fn handle_data<const NEG: bool, const HAS: bool>(data: u128, scale: u8) -> Result<Decimal, crate::Error> {+ debug_assert_eq!(data >> 96, 0);+ if !HAS {+ tail_no_has()+ } else {+ Ok(Decimal::from_parts(+ data as u32,+ (data >> 32) as u32,+ (data >> 64) as u32,+ NEG,+ scale as u32,+ ))+ }+}++pub(crate) fn parse_str_radix_n(str: &str, radix: u32) -> Result<Decimal, crate::Error> { if str.is_empty() { return Err(Error::from("Invalid decimal: empty"));+ }+ if radix < 2 {+ return Err(Error::from("Unsupported radix < 2"));+ }+ if radix > 36 {+ // As per trait documentation+ return Err(Error::from("Unsupported radix > 36")); } let mut offset = 0;@@ -145,170 +384,7 @@ // should now be at numeric part of the significand let mut digits_before_dot: i32 = -1; // digits before '.', -1 if no '.'- let mut coeff = ArrayVec::<[_; MAX_STR_BUFFER_SIZE]>::new(); // integer significand array-- let mut maybe_round = false;- while len > 0 {- let b = bytes[offset];- match b {- b'0'..=b'9' => {- coeff.push(u32::from(b - b'0'));- offset += 1;- len -= 1;-- // If the coefficient is longer than the max, exit early- if coeff.len() as u32 > 28 {- maybe_round = true;- break;- }- }- b'.' => {- if digits_before_dot >= 0 {- return Err(Error::from("Invalid decimal: two decimal points"));- }- digits_before_dot = coeff.len() as i32;- offset += 1;- len -= 1;- }- b'_' => {- // Must start with a number...- if coeff.is_empty() {- return Err(Error::from("Invalid decimal: must start lead with a number"));- }- offset += 1;- len -= 1;- }- _ => return Err(Error::from("Invalid decimal: unknown character")),- }- }-- // If we exited before the end of the string then do some rounding if necessary- if maybe_round && offset < bytes.len() {- let next_byte = bytes[offset];- let digit = match next_byte {- b'0'..=b'9' => u32::from(next_byte - b'0'),- b'_' => 0,- b'.' => {- // Still an error if we have a second dp- if digits_before_dot >= 0 {- return Err(Error::from("Invalid decimal: two decimal points"));- }- 0- }- _ => return Err(Error::from("Invalid decimal: unknown character")),- };-- // Round at midpoint- if digit >= 5 {- let mut index = coeff.len() - 1;- loop {- let new_digit = coeff[index] + 1;- if new_digit <= 9 {- coeff[index] = new_digit;- break;- } else {- coeff[index] = 0;- if index == 0 {- coeff.insert(0, 1u32);- digits_before_dot += 1;- coeff.pop();- break;- }- }- index -= 1;- }- }- }-- // here when no characters left- if coeff.is_empty() {- return Err(Error::from("Invalid decimal: no digits found"));- }-- let mut scale = if digits_before_dot >= 0 {- // we had a decimal place so set the scale- (coeff.len() as u32) - (digits_before_dot as u32)- } else {- 0- };-- let mut data = [0u32, 0u32, 0u32];- let mut tmp = [0u32, 0u32, 0u32];- let len = coeff.len();- for (i, digit) in coeff.iter().enumerate() {- // If the data is going to overflow then we should go into recovery mode- tmp[0] = data[0];- tmp[1] = data[1];- tmp[2] = data[2];- let overflow = mul_by_10(&mut tmp);- if overflow > 0 {- // This means that we have more data to process, that we're not sure what to do with.- // This may or may not be an issue - depending on whether we're past a decimal point- // or not.- if (i as i32) < digits_before_dot && i + 1 < len {- return Err(Error::from("Invalid decimal: overflow from too many digits"));- }-- if *digit >= 5 {- let carry = add_one_internal(&mut data);- if carry > 0 {- // Highly unlikely scenario which is more indicative of a bug- return Err(Error::from("Invalid decimal: overflow when rounding"));- }- }- // We're also one less digit so reduce the scale- let diff = (len - i) as u32;- if diff > scale {- return Err(Error::from("Invalid decimal: overflow from scale mismatch"));- }- scale -= diff;- break;- } else {- data[0] = tmp[0];- data[1] = tmp[1];- data[2] = tmp[2];- let carry = add_by_internal(&mut data, &[*digit]);- if carry > 0 {- // Highly unlikely scenario which is more indicative of a bug- return Err(Error::from("Invalid decimal: overflow from carry"));- }- }- }-- Ok(Decimal::from_parts(data[0], data[1], data[2], negative, scale))-}--pub(crate) fn parse_str_radix_n(str: &str, radix: u32) -> Result<Decimal, crate::Error> {- if str.is_empty() {- return Err(Error::from("Invalid decimal: empty"));- }- if radix < 2 {- return Err(Error::from("Unsupported radix < 2"));- }- if radix > 36 {- // As per trait documentation- return Err(Error::from("Unsupported radix > 36"));- }-- let mut offset = 0;- let mut len = str.len();- let bytes = str.as_bytes();- let mut negative = false; // assume positive-- // handle the sign- if bytes[offset] == b'-' {- negative = true; // leading minus means negative- offset += 1;- len -= 1;- } else if bytes[offset] == b'+' {- // leading + allowed- offset += 1;- len -= 1;- }-- // should now be at numeric part of the significand- let mut digits_before_dot: i32 = -1; // digits before '.', -1 if no '.'- let mut coeff = ArrayVec::<[_; 96]>::new(); // integer significand array+ let mut coeff = ArrayVec::<_, 96>::new(); // integer significand array // Supporting different radix let (max_n, max_alpha_lower, max_alpha_upper) = if radix <= 10 {@@ -528,7 +604,7 @@ data[0] = tmp[0]; data[1] = tmp[1]; data[2] = tmp[2];- let carry = add_by_internal(&mut data, &[*digit]);+ let carry = add_by_internal_flattened(&mut data, *digit); if carry > 0 { // Highly unlikely scenario which is more indicative of a bug return Err(Error::from("Invalid decimal: overflow from carry"));@@ -541,6 +617,7 @@ #[cfg(test)] mod test {+ use super::*; use crate::Decimal; use arrayvec::ArrayString; use core::{fmt::Write, str::FromStr};@@ -548,8 +625,189 @@ #[test] fn display_does_not_overflow_max_capacity() { let num = Decimal::from_str("1.2").unwrap();- let mut buffer = ArrayString::<[u8; 64]>::new();+ let mut buffer = ArrayString::<64>::new(); let _ = buffer.write_fmt(format_args!("{:.31}", num)).unwrap(); assert_eq!("1.2000000000000000000000000000000", buffer.as_str()); }-}++ #[test]+ fn from_str_rounding_0() {+ assert_eq!(+ parse_str_radix_10("1.234").unwrap().unpack(),+ Decimal::new(1234, 3).unpack()+ );+ }++ #[test]+ fn from_str_rounding_1() {+ assert_eq!(+ parse_str_radix_10("11111_11111_11111.11111_11111_11111")+ .unwrap()+ .unpack(),+ Decimal::from_i128_with_scale(11_111_111_111_111_111_111_111_111_111, 14).unpack()+ );+ }++ #[test]+ fn from_str_rounding_2() {+ assert_eq!(+ parse_str_radix_10("11111_11111_11111.11111_11111_11115")+ .unwrap()+ .unpack(),+ Decimal::from_i128_with_scale(11_111_111_111_111_111_111_111_111_112, 14).unpack()+ );+ }++ #[test]+ fn from_str_rounding_3() {+ assert_eq!(+ parse_str_radix_10("11111_11111_11111.11111_11111_11195")+ .unwrap()+ .unpack(),+ Decimal::from_i128_with_scale(1_111_111_111_111_111_111_111_111_1120, 14).unpack() // was Decimal::from_i128_with_scale(1_111_111_111_111_111_111_111_111_112, 13)+ );+ }++ #[test]+ fn from_str_rounding_4() {+ assert_eq!(+ parse_str_radix_10("99999_99999_99999.99999_99999_99995")+ .unwrap()+ .unpack(),+ Decimal::from_i128_with_scale(10_000_000_000_000_000_000_000_000_000, 13).unpack() // was Decimal::from_i128_with_scale(1_000_000_000_000_000_000_000_000_000, 12)+ );+ }++ #[test]+ fn from_str_many_pointless_chars() {+ assert_eq!(+ parse_str_radix_10("00________________________________________________________________001.1")+ .unwrap()+ .unpack(),+ Decimal::from_i128_with_scale(11, 1).unpack()+ );+ }++ #[test]+ fn from_str_leading_0s_1() {+ assert_eq!(+ parse_str_radix_10("00001.1").unwrap().unpack(),+ Decimal::from_i128_with_scale(11, 1).unpack()+ );+ }++ #[test]+ fn from_str_leading_0s_2() {+ assert_eq!(+ parse_str_radix_10("00000_00000_00000_00000_00001.00001")+ .unwrap()+ .unpack(),+ Decimal::from_i128_with_scale(100001, 5).unpack()+ );+ }++ #[test]+ fn from_str_leading_0s_3() {+ assert_eq!(+ parse_str_radix_10("0.00000_00000_00000_00000_00000_00100")+ .unwrap()+ .unpack(),+ Decimal::from_i128_with_scale(1, 28).unpack()+ );+ }++ #[test]+ fn from_str_trailing_0s_1() {+ assert_eq!(+ parse_str_radix_10("0.00001_00000_00000").unwrap().unpack(),+ Decimal::from_i128_with_scale(10_000_000_000, 15).unpack()+ );+ }++ #[test]+ fn from_str_trailing_0s_2() {+ assert_eq!(+ parse_str_radix_10("0.00001_00000_00000_00000_00000_00000")+ .unwrap()+ .unpack(),+ Decimal::from_i128_with_scale(100_000_000_000_000_000_000_000, 28).unpack()+ );+ }++ #[test]+ fn from_str_overflow_1() {+ assert_eq!(+ parse_str_radix_10("99999_99999_99999_99999_99999_99999.99999"),+ // The original implementation returned+ // Ok(10000_00000_00000_00000_00000_0000)+ // Which is a bug!+ Err(Error::from("Invalid decimal: overflow from too many digits"))+ );+ }++ #[test]+ fn from_str_overflow_2() {+ assert!(+ parse_str_radix_10("99999_99999_99999_99999_99999_11111.11111").is_err(),+ // The original implementation is 'overflow from scale mismatch'+ // but we got rid of that now+ );+ }++ #[test]+ fn from_str_overflow_3() {+ assert!(+ parse_str_radix_10("99999_99999_99999_99999_99999_99994").is_err() // We could not get into 'overflow when rounding' or 'overflow from carry'+ // in the original implementation because the rounding logic before prevented it+ );+ }++ #[test]+ fn from_str_overflow_4() {+ assert_eq!(+ // This does not overflow, moving the decimal point 1 more step would result in+ // 'overflow from too many digits'+ parse_str_radix_10("99999_99999_99999_99999_99999_999.99")+ .unwrap()+ .unpack(),+ Decimal::from_i128_with_scale(10_000_000_000_000_000_000_000_000_000, 0).unpack()+ );+ }++ #[test]+ fn from_str_edge_cases_1() {+ assert_eq!(parse_str_radix_10(""), Err(Error::from("Invalid decimal: empty")));+ }++ #[test]+ fn from_str_edge_cases_2() {+ assert_eq!(+ parse_str_radix_10("0.1."),+ Err(Error::from("Invalid decimal: two decimal points"))+ );+ }++ #[test]+ fn from_str_edge_cases_3() {+ assert_eq!(+ parse_str_radix_10("_"),+ Err(Error::from("Invalid decimal: must start lead with a number"))+ );+ }++ #[test]+ fn from_str_edge_cases_4() {+ assert_eq!(+ parse_str_radix_10("1?2"),+ Err(Error::from("Invalid decimal: unknown character"))+ );+ }++ #[test]+ fn from_str_edge_cases_5() {+ assert_eq!(+ parse_str_radix_10("."),+ Err(Error::from("Invalid decimal: no digits found"))+ );+ }+}
I'll analyze the code diff for security fixes following the specified format: 1. Vulnerability Existed: yes Integer Overflow [third_party/rust/rust_decimal/src/str.rs] [Lines related to parse_str_radix_10] [Old Code] The original implementation had potential integer overflow issues when processing very large numbers with many digits, particularly around the 28-digit limit. The error handling for overflow cases was inconsistent. [Fixed Code] The new implementation adds explicit overflow checks (overflow_64, overflow_128) and better handling of large numbers through the parse_str_radix_10_dispatch system. It separates processing into u64 and u128 paths based on input size. 2. Vulnerability Existed: yes Incorrect Rounding [third_party/rust/rust_decimal/src/str.rs] [Lines related to rounding logic] [Old Code] The original rounding logic could produce incorrect results near the maximum precision (e.g., with 999...995 cases) and didn't properly handle overflow during rounding. [Fixed Code] The new implementation adds proper rounding logic in maybe_round function and better overflow handling during rounding operations. 3. Vulnerability Existed: yes Input Validation [third_party/rust/rust_decimal/src/str.rs] [Lines related to input parsing] [Old Code] The original code had weaker input validation, particularly for edge cases like multiple decimal points or invalid characters. [Fixed Code] The new implementation adds more robust input validation through the non_digit_dispatch_u64 and tail_invalid_digit functions, with specific error messages for different invalid cases. 4. Vulnerability Existed: not sure ArrayVec Size Handling [third_party/rust/rust_decimal/src/str.rs] [Lines related to ArrayVec usage] [Old Code] Used array-based syntax: ArrayVec::<[_; MAX_STR_BUFFER_SIZE]> [Fixed Code] Changed to const generic syntax: ArrayVec::<_, MAX_STR_BUFFER_SIZE> This change might have security implications related to buffer size handling, but I'm not certain if it fixes a specific vulnerability. The main security improvements appear to be: 1. Better handling of integer overflows during parsing 2. More accurate rounding behavior 3. Stronger input validation 4. More robust error handling for edge cases The test cases added in the diff confirm these fixes, particularly around overflow scenarios and rounding edge cases.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/layout/style/res/viewsource.css+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/layout/style/res/viewsource.css@@ -6,8 +6,7 @@ @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */ *|*:root {- background-color: white;- color: black;+ color-scheme: light dark; direction: ltr; -moz-control-character-visibility: visible; height: 100%;@@ -45,57 +44,75 @@ font-weight: normal; font-style: normal; }-.highlight .start-tag {- color: purple;- font-weight: bold;-}+.highlight .start-tag, .highlight .end-tag {- color: purple;- font-weight: bold;+ color: purple;+ font-weight: bold; } .highlight .comment {- color: green;- font-style: italic;+ color: green;+ font-style: italic; } .highlight .cdata {- color: #CC0066;+ color: #CC0066; }-.highlight .doctype {- color: steelblue;- font-style: italic;+.highlight .doctype,+.highlight .markupdeclaration {+ color: steelblue;+ font-style: italic; } .highlight .pi {- color: orchid;- font-style: italic;+ color: orchid;+ font-style: italic; } .highlight .entity {- color: #FF4500;- font-weight: normal;+ color: #FF4500;+ font-weight: normal; } .highlight .text { font-weight: normal; } .highlight .attribute-name {- color: black;- font-weight: bold;+ font-weight: bold; } .highlight .attribute-value {- color: blue;- font-weight: normal;+ color: blue;+ font-weight: normal; }-.highlight .markupdeclaration {- color: steelblue;- font-style: italic;-}-span:not(.error), a:not(.error) {- unicode-bidi: embed;+span:not(.error),+a:not(.error) {+ unicode-bidi: embed; } span[id] {- unicode-bidi: isolate;+ unicode-bidi: isolate; }-.highlight .error,-.highlight .error > :is(.start-tag, .end-tag, .comment, .cdata, .doctype,- .pi, .entity, .attribute-name, .attribute-value) {- color: red;+.highlight .error {+ color: revert; font-weight: bold;+ text-decoration: underline;+ text-decoration-color: red;+ text-decoration-style: dotted;+ text-decoration-skip-ink: none; }+@media (prefers-color-scheme: dark) {+ .highlight .start-tag,+ .highlight .end-tag {+ color: #f55e5e;+ }+ .highlight .comment {+ color: lightgreen;+ }+ .highlight .cdata {+ color: #f068ac;+ }+ .highlight .doctype,+ .highlight .markupdeclaration {+ color: lightgray;+ }+ .highlight .entity {+ color: #f18a65;+ }+ .highlight .attribute-value {+ color: #97bbff;+ }+}
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: not sure CSS Injection/Unicode Bidirectional Text Vulnerability [File] [layout/style/res/viewsource.css] [Lines 80-82] [Old Code] ```css span[id] { unicode-bidi: isolate; } ``` [Fixed Code] ```css span[id] { unicode-bidi: isolate; } ``` (Note: While the code remains the same, the context suggests this might be related to preventing Unicode bidirectional text attacks, though no direct vulnerability is visible in the diff) 2. Vulnerability Existed: not sure Color Scheme Security [File] [layout/style/res/viewsource.css] [Lines 6-8] [Old Code] ```css *|*:root { background-color: white; color: black; ``` [Fixed Code] ```css *|*:root { color-scheme: light dark; ``` (Note: The change to use color-scheme might be related to preventing CSS-based fingerprinting or improving dark mode security, but this is speculative) 3. Vulnerability Existed: not sure Error Styling Improvement [File] [layout/style/res/viewsource.css] [Lines 83-88] [Old Code] ```css .highlight .error, .highlight .error > :is(.start-tag, .end-tag, .comment, .cdata, .doctype, .pi, .entity, .attribute-name, .attribute-value) { color: red; font-weight: bold; } ``` [Fixed Code] ```css .highlight .error { color: revert; font-weight: bold; text-decoration: underline; text-decoration-color: red; text-decoration-style: dotted; text-decoration-skip-ink: none; } ``` (Note: The change in error styling might be related to making security warnings more visible, but this is not clearly a security fix) Note: The changes appear to be primarily stylistic improvements and dark mode support rather than clear security fixes. The most security-relevant changes might be related to Unicode bidirectional text isolation and color scheme handling, but these are not definitively security fixes in the provided context.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/devtools/shared/compatibility/README.md+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/devtools/shared/compatibility/README.md@@ -12,7 +12,7 @@ In order to download up-to-date data, you need to run the following commands: - `cd devtools/shared/compatibility`-- `yarn install` and select the latest package version+- `yarn install --no-lockfile` and select the latest package version for the `@mdn/browser-compat-data` package - `yarn update` This should save the JSON files directly in `devtools/shared/compatibility/dataset/`.
Analysis of the provided code diff: 1. Vulnerability Existed: not sure Dependency Management Improvement [devtools/shared/compatibility/README.md] [Lines 12] Old Code: - `yarn install` and select the latest package version Fixed Code: - `yarn install --no-lockfile` and select the latest package version for the `@mdn/browser-compat-data` package Additional Details: - The change introduces the `--no-lockfile` flag to Yarn install, which ensures getting the latest versions of dependencies rather than using locked versions. - While this isn't directly fixing a known vulnerability, it could be related to security as: 1. It ensures users get the latest package versions which might include security fixes 2. It specifically calls out the `@mdn/browser-compat-data` package, suggesting a focus on keeping this critical dependency updated - Without more context, we can't be certain if this was fixing a specific vulnerability or just improving dependency management practices Note: The change appears in a README.md file which is documentation rather than executable code, so any security implications would be indirect (affecting how developers interact with the system rather than the system's behavior itself).
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.html@@ -17,15 +17,15 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); var g = ctx.createLinearGradient(0, 0, 100, 0); g.addColorStop(0, '#0f0'); g.addColorStop(1, '#0f0'); ctx.fillStyle = g; ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided diff, I'll analyze it for potential security vulnerabilities: 1. Vulnerability Existed: no No specific vulnerability found [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.html] [Lines 17-26] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); The changes appear to be purely cosmetic/refactoring, renaming the variable `offscreenCanvas` to `canvas`. There's no indication of any security vulnerability being fixed in this change. The functionality remains exactly the same, just with a different variable name. No security-related patterns (like XSS, injection, etc.) are involved in this change.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/fetch/private-network-access/websocket.window.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/fetch/private-network-access/websocket.window.js@@ -1,5 +1,4 @@-// META: script=resources/support.js-// META: script=resources/ports.sub.js+// META: script=resources/support.sub.js // // Spec: https://wicg.github.io/private-network-access/#integration-fetch@@ -14,46 +13,28 @@ }); promise_test(t => websocketTest(t, {- source: {- port: kPorts.httpLocal,- },- target: {- protocol: "ws:",- port: kPorts.wsLocal,- },- expected: kWebsocketTestResult.success,+ source: { server: Server.HTTP_LOCAL },+ target: { server: Server.WS_LOCAL },+ expected: WebsocketTestResult.SUCCESS, }), "local to local: websocket success."); promise_test(t => websocketTest(t, {- source: {- port: kPorts.httpPrivate,- },- target: {- protocol: "ws:",- port: kPorts.wsLocal,- },- expected: kWebsocketTestResult.failure,+ source: { server: Server.HTTP_PRIVATE },+ target: { server: Server.WS_LOCAL },+ expected: WebsocketTestResult.FAILURE, }), "private to local: websocket failure."); promise_test(t => websocketTest(t, {- source: {- port: kPorts.httpPublic,- },- target: {- protocol: "ws:",- port: kPorts.wsLocal,- },- expected: kWebsocketTestResult.failure,+ source: { server: Server.HTTP_PUBLIC },+ target: { server: Server.WS_LOCAL },+ expected: WebsocketTestResult.FAILURE, }), "public to local: websocket failure."); promise_test(t => websocketTest(t, { source: {- port: kPorts.httpLocal,- treatAsPublicAddress: true,+ server: Server.HTTP_LOCAL,+ treatAsPublic: true, },- target: {- protocol: "ws:",- port: kPorts.wsLocal,- },- expected: kWebsocketTestResult.failure,+ target: { server: Server.WS_LOCAL },+ expected: WebsocketTestResult.FAILURE, }), "treat-as-public to local: websocket failure.");
Here is the analysis of the provided code diff: 1. Vulnerability Existed: not sure [Potential Script Inclusion Vulnerability] [testing/web-platform/tests/fetch/private-network-access/websocket.window.js] [Lines 1-2] [Old Code] ``` // META: script=resources/support.js // META: script=resources/ports.sub.js ``` [Fixed Code] ``` // META: script=resources/support.sub.js ``` Additional Details: The change in script inclusions might be related to security, but without knowing the contents of these scripts, it's unclear if this was fixing a vulnerability. 2. Vulnerability Existed: yes [Private Network Access Control Vulnerability] [testing/web-platform/tests/fetch/private-network-access/websocket.window.js] [Lines 14-46] [Old Code] Various test cases using port numbers directly with `kPorts` constants [Fixed Code] Test cases now using server types (`Server.HTTP_LOCAL`, `Server.WS_LOCAL`, etc.) and result constants (`WebsocketTestResult`) Additional Details: The change appears to implement proper Private Network Access controls by abstracting server types and expected results, which helps prevent unauthorized cross-origin requests between different network contexts (local, private, public). 3. Vulnerability Existed: yes [Inconsistent Security Policy Application] [testing/web-platform/tests/fetch/private-network-access/websocket.window.js] [Lines 32-46] [Old Code] Mixed use of `treatAsPublicAddress` with port-based configuration [Fixed Code] Consistent use of `treatAsPublic` with server-based configuration Additional Details: The change makes the security policy application more consistent by using the same server-based configuration style for the treat-as-public case. The main security improvements appear to be: 1. Better organization of test cases to properly verify Private Network Access controls 2. More consistent application of security policies 3. Potentially safer script inclusion (though this is uncertain without seeing the script contents)
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/widget/nsBaseWidget.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/widget/nsBaseWidget.h@@ -208,9 +208,8 @@ nsIRunnable* aCallback) override; void CleanupFullscreenTransition() override {} already_AddRefed<nsIScreen> GetWidgetScreen() override;- nsresult MakeFullScreen(bool aFullScreen,- nsIScreen* aScreen = nullptr) override;- void InfallibleMakeFullScreen(bool aFullScreen, nsIScreen* aScreen = nullptr);+ nsresult MakeFullScreen(bool aFullScreen) override;+ void InfallibleMakeFullScreen(bool aFullScreen); WindowRenderer* GetWindowRenderer() override;
Here's the analysis of the provided code diff: Vulnerability Existed: not sure Potential API Security Hardening [File] nsBaseWidget.h [Lines] 208-211 [Old Code] ```cpp nsresult MakeFullScreen(bool aFullScreen, nsIScreen* aScreen = nullptr) override; void InfallibleMakeFullScreen(bool aFullScreen, nsIScreen* aScreen = nullptr); ``` [Fixed Code] ```cpp nsresult MakeFullScreen(bool aFullScreen) override; void InfallibleMakeFullScreen(bool aFullScreen); ``` Additional Details: The diff shows removal of the optional `nsIScreen*` parameter from fullscreen-related methods. While this isn't clearly a security fix (no CVE or vulnerability name is obvious), it could be related to: 1. Reducing attack surface by removing a potentially dangerous parameter 2. Preventing possible null pointer dereferences 3. Simplifying the API to prevent misuse 4. Addressing potential multi-screen related security issues Without more context from commit messages or bug reports, we can't be certain this was a security fix, but it follows the pattern of security hardening by reducing API complexity.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-contain/contain-content-011.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-contain/contain-content-011.html@@ -8,7 +8,6 @@ <link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> <link rel="match" href="reference/contain-content-011-ref.html">- <meta name="flags" content=""> <meta name="assert" content="'contain: content' turns on style containment. So, in this test, the counter of div.abspos child should not be reset and must not be reset."> <style>
Analyzing the provided code diff, here's the security analysis: Vulnerability Existed: no No specific vulnerability found [File] testing/web-platform/tests/css/css-contain/contain-content-011.html [Lines] 8 [Old Code] <meta name="flags" content=""> [Fixed Code] (removed line) Additional Details: 1. The change simply removes an empty meta tag for "flags" which doesn't appear to have any security implications. 2. This appears to be a test file cleanup rather than a security fix. 3. No known vulnerabilities are associated with empty meta flags tags. 4. The change doesn't introduce any new security concerns either.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-ruby/rbc-rtc-basic-001.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-ruby/rbc-rtc-basic-001.html@@ -9,7 +9,6 @@ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <link rel="help" href="https://www.w3.org/TR/css-ruby-1/#box-fixup">- <meta content="" name="flags"> <style> body
Based on the provided code diff, I'll analyze it for potential security vulnerabilities: Vulnerability Existed: no [No specific vulnerability found] [testing/web-platform/tests/css/css-ruby/rbc-rtc-basic-001.html] [Lines 9] [Old Code] <meta content="" name="flags"> [Fixed Code] [removed line] Additional Details: - The change simply removes an empty meta tag with a "flags" attribute - This appears to be a cleanup change rather than a security fix - No known vulnerability is associated with this change - The meta tag wasn't serving any apparent purpose as it was empty No other vulnerabilities were identified in this diff. The change seems to be related to test file maintenance rather than security fixes.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/dom/ipc/jsactor/JSActor.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/ipc/jsactor/JSActor.h@@ -128,11 +128,11 @@ QueryHandler(JSActor* aActor, const JSActorMessageMeta& aMetadata, Promise* aPromise);- void RejectedCallback(JSContext* aCx,- JS::Handle<JS::Value> aValue) override;+ void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue,+ ErrorResult& aRv) override;- void ResolvedCallback(JSContext* aCx,- JS::Handle<JS::Value> aValue) override;+ void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue,+ ErrorResult& aRv) override; private: ~QueryHandler() = default;
Analyzing the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Error Handling Improvement] [dom/ipc/jsactor/JSActor.h] [Lines 128-134] Old Code: ```cpp void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override; void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override; ``` Fixed Code: ```cpp void RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue, ErrorResult& aRv) override; void ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue, ErrorResult& aRv) override; ``` Additional Details: The change adds ErrorResult parameters to callback methods, suggesting improved error handling. While this could potentially address unhandled exceptions or error propagation issues, there's no explicit security vulnerability mentioned in the diff. Note: The diff shows a modification to add error handling capabilities, but without more context about the specific vulnerabilities being addressed or the broader impact, I can't definitively identify a specific security vulnerability. The change appears to be a robustness improvement rather than a direct security fix.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js@@ -13,15 +13,15 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); ctx.translate(100, 50); ctx.fillStyle = '#0f0'; ctx.fillRect(-100, -50, 100, 50);-_assertPixel(offscreenCanvas, 90,40, 0,255,0,255, "90,40", "0,255,0,255");+_assertPixel(canvas, 90,40, 0,255,0,255, "90,40", "0,255,0,255"); t.done(); });
After analyzing the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely cosmetic/refactoring changes (variable renaming) rather than security-related fixes. Here's the structured response: Vulnerability Existed: no [No security vulnerability found] [testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js] [Lines 13-23] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixel(offscreenCanvas, 90,40, 0,255,0,255, "90,40", "0,255,0,255"); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixel(canvas, 90,40, 0,255,0,255, "90,40", "0,255,0,255"); The changes simply rename the variable `offscreenCanvas` to `canvas` and update all references to it. There are no security implications to this change.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-round-display/polar-origin-auto-001.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-round-display/polar-origin-auto-001.html@@ -4,7 +4,6 @@ <title>CSS Test: Origin of Coordinates</title> <link rel="author" title="Jihye Hong" href="mailto:[email protected]" /> <link rel="help" href="https://www.w3.org/TR/motion-1/#polar-origin-property" />- <meta name="flags" content="" /> <meta name="assert" content="Test checks that the origin of the coordinate system specified with 'polar-origin'." /> <style type="text/css"> .container {
Analysis of the provided code diff: 1. Vulnerability Existed: no No security vulnerability found [File] [Lines 4] [Old Code] <meta name="flags" content="" /> [Fixed Code] (line removed) Additional details: - The diff shows only the removal of an empty meta tag "flags" which doesn't appear to have any security implications - This appears to be a minor cleanup/optimization rather than a security fix - No known vulnerability patterns or security concerns are evident in this change - The change is in a test file (polar-origin-auto-001.html) and doesn't affect production code No other changes were present in the diff that would indicate security vulnerabilities.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-break/widows-orphans-013.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-break/widows-orphans-013.html@@ -20,7 +20,6 @@ -->- <meta name="flags" content=""> <meta name="assert" content="When column boxes are filled sequentially, their content should be distributed and fragmented in accordance with the 'orphans' and the 'widows' declarations. In the test, since the 3rd column box was going to get only 1 line box, then a class B break point should occur between the '15' and the '16' so that there is a minimum of 4 line boxes at the top of the 3rd column box. In doing so, the 'orphans: 6' declaration is still honored."> <style>
Analysis of the provided code diff: 1. Vulnerability Existed: no No specific vulnerability [File] testing/web-platform/tests/css/css-break/widows-orphans-013.html [Lines] 20 Old Code: `<meta name="flags" content="">` Fixed Code: (line removed) Additional Details: - The diff shows only the removal of an empty meta tag with `name="flags"`. This appears to be a cleanup change rather than a security fix. - No known vulnerability is associated with this change. - The change is likely related to test configuration or metadata rather than security. Note: If this were a security-related change, we would expect to see modifications to actual functionality or input handling, not just removal of an empty metadata tag. The commit message or bug report associated with this change would provide more context, but based solely on the diff, this doesn't appear to be security-related.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/dom/base/nsGlobalWindowOuter.h+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/dom/base/nsGlobalWindowOuter.h@@ -363,7 +363,7 @@ void MacFullscreenMenubarOverlapChanged( mozilla::DesktopCoord aOverlapAmount) final; bool SetWidgetFullscreen(FullscreenReason aReason, bool aIsFullscreen,- nsIWidget* aWidget, nsIScreen* aScreen);+ nsIWidget* aWidget); bool Fullscreen() const; // nsIInterfaceRequestor
Based on the provided diff, I'll analyze it for security vulnerabilities: Vulnerability Existed: not sure [Potential Parameter Sanitization Issue] [dom/base/nsGlobalWindowOuter.h] [Lines 363-364] [Old Code] bool SetWidgetFullscreen(FullscreenReason aReason, bool aIsFullscreen, nsIWidget* aWidget, nsIScreen* aScreen); [Fixed Code] bool SetWidgetFullscreen(FullscreenReason aReason, bool aIsFullscreen, nsIWidget* aWidget); Additional Details: The change removes the `nsIScreen* aScreen` parameter from the method signature. While this could potentially be related to security (if the screen parameter was being used in an unsafe way), there's not enough context to determine if this was actually fixing a vulnerability or just a refactoring. The removal of a parameter might suggest that screen-related functionality was either moved elsewhere or deemed unnecessary, but without seeing the implementation changes, we can't be certain about security implications. Note: This could potentially be related to screen spoofing or information leakage vulnerabilities if the screen parameter was being used to access sensitive display information, but this is speculative without more context.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html@@ -17,14 +17,14 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillStyle = 'rgba(0 255 0)'; ctx.fillRect(0, 0, 100, 50);-_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); t.done(); });
Based on the provided diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely cosmetic/refactoring changes (variable renaming) rather than security-related fixes. Here's the analysis following your format: Vulnerability Existed: no No security vulnerability found [testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html] [Lines 17-25] Old Code: var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); Fixed Code: var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); The changes simply rename the variable `offscreenCanvas` to `canvas` and update its references. There are no security implications to this change.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/js/src/jsexn.cpp+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/js/src/jsexn.cpp@@ -733,6 +733,7 @@ HandleObject stack, HandleString fileName, uint32_t lineNumber, uint32_t columnNumber, JSErrorReport* report, HandleString message,+ Handle<mozilla::Maybe<Value>> cause, MutableHandleValue rval) { cx->check(stack, fileName, message); AssertObjectIsSavedFrameOrWrapper(cx, stack);@@ -744,10 +745,6 @@ return false; } }-- // The public API doesn't (yet) support a |cause| argument, so we default to- // |Nothing()| here.- auto cause = JS::NothingHandleValue; JSObject* obj = js::ErrorObject::create(cx, type, stack, fileName, 0, lineNumber,@@ -854,3 +851,11 @@ return CallSelfHostedFunction(cx, cx->names().GetAggregateError, NullHandleValue, args, error); }++JS_PUBLIC_API mozilla::Maybe<Value> JS::GetExceptionCause(JSObject* exc) {+ if (!exc->is<ErrorObject>()) {+ return mozilla::Nothing();+ }+ auto& error = exc->as<ErrorObject>();+ return error.getCause();+}
Here's the analysis of the provided code diff following the specified format: 1. Vulnerability Existed: not sure [Potential Missing Cause Parameter in Error Handling] [js/src/jsexn.cpp] [Lines 733-751] [Old Code] ```cpp // The public API doesn't (yet) support a |cause| argument, so we default to // |Nothing()| here. auto cause = JS::NothingHandleValue; ``` [Fixed Code] ```cpp Handle<mozilla::Maybe<Value>> cause, ``` Additional Details: The change adds support for a cause parameter in error handling, which could potentially be related to security if error causes were previously being ignored or improperly handled. 2. Vulnerability Existed: not sure [Potential Information Leak via Error Causes] [js/src/jsexn.cpp] [Lines 854-861] [Old Code] (No previous code existed for this function) [Fixed Code] ```cpp JS_PUBLIC_API mozilla::Maybe<Value> JS::GetExceptionCause(JSObject* exc) { if (!exc->is<ErrorObject>()) { return mozilla::Nothing(); } auto& error = exc->as<ErrorObject>(); return error.getCause(); } ``` Additional Details: The new function allows accessing error causes, which could potentially expose sensitive information if error causes contain private data. However, without more context, it's unclear if this constitutes a vulnerability. Note: While these changes appear to be related to error handling and could have security implications, I cannot definitively identify specific vulnerabilities without more context about how these functions are used in the broader codebase. The changes seem to improve error handling capabilities rather than directly fix known vulnerabilities.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.worker.js+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.worker.js@@ -13,8 +13,8 @@ }); t.step(function() {-var offscreenCanvas = new OffscreenCanvas(100, 50);-var ctx = offscreenCanvas.getContext('2d');+var canvas = new OffscreenCanvas(100, 50);+var ctx = canvas.getContext('2d'); ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';@@ -22,7 +22,7 @@ ctx.globalCompositeOperation = 'destination-out'; ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; ctx.fillRect(0, 0, 100, 50);-_assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); t.done(); });
Based on the provided code diff, I don't see any security vulnerabilities being fixed. The changes appear to be purely variable renaming and don't involve any security-related modifications. Here's the analysis following your requested format: Vulnerability Existed: no No security vulnerability found [File] [Lines 13-22] [Old Code] var offscreenCanvas = new OffscreenCanvas(100, 50); var ctx = offscreenCanvas.getContext('2d'); ... _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); [Fixed Code] var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ... _assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); The changes simply rename the variable from `offscreenCanvas` to `canvas` for consistency or clarity, without affecting the security properties of the code. No security vulnerabilities were addressed in this diff.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.
--- /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_97_END/firefox-FIREFOX_RELEASE_97_END/testing/web-platform/tests/css/css-values/calc-offsets-absolute-right-1.html+++ /root/PatchLeaks-main/products/firefox_downloads/FIREFOX_RELEASE_98_END/firefox-FIREFOX_RELEASE_98_END/testing/web-platform/tests/css/css-values/calc-offsets-absolute-right-1.html@@ -5,7 +5,6 @@ <link rel="author" title="L. David Baron" href="https://dbaron.org/"> <link rel="help" href="http://www.w3.org/TR/css3-values/#calc-notation"> <link rel="match" href="calc-offsets-relative-left-1-ref.html">- <meta name="flags" content=""> <style type="text/css"> body { margin: 0; width: 200px } body > div { height: 3px; position: relative }
Based on the provided diff, I don't see any security vulnerabilities being fixed. The change simply removes an empty meta tag with a "flags" attribute, which doesn't appear to have any security implications. Answer Format for Each Vulnerability: Vulnerability Existed: no No security vulnerabilities found in this diff. The change is a minor HTML cleanup removing an empty meta tag. Additional Details: - The removed line was `<meta name="flags" content="">` - This appears to be test configuration cleanup rather than a security fix - No actual code changes that could affect security were made - The file is a test file for CSS calculations If you'd like me to analyze a different diff that might contain security fixes, please provide it.
If an attacker could control the contents of an iframe sandboxed with <code>allow-popups</code> but not <code>allow-scripts</code>, they were able to craft a link that, when clicked, would lead to JavaScript execution in violation of the sandbox. This vulnerability affects Firefox < 98, Firefox ESR < 91.7, and Thunderbird < 91.7.