Closed Bug 1286059 Opened 10 years ago Closed 6 years ago

crypto.subtle.encrypt with AES-GCM and a bad tag length throws incorrect error

Categories

(Core :: Security: PSM, defect, P3)

49 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: bugzilla, Assigned: rmf)

Details

(Whiteboard: [psm-backlog])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 Build ID: 20160708004052 Steps to reproduce: Open the JavaScript console and run the following code: crypto.subtle.generateKey( {name: "AES-GCM", length: 128}, false, ["encrypt", "decrypt"] ).then(function(key) { return crypto.subtle.encrypt( {name: "AES-GCM", tagLength: 48, iv: new Uint8Array(16), additionalData: new Uint8Array(8)}, key, new Uint8Array(32)); }).then(function(ciphertext) { console.log("Okay");}) .catch(function(err) {console.log(err.name);}) Actual results: It displayed "SyntaxError" in the console. Expected results: It should have displayed "OperationError". See https://w3c.github.io/webcrypto/Overview.html#aes-gcm-operations, step 5 of the encrypt operation.
Hi Charles, feel free to update the component, I was alerted to this because we want to avoid issues remaining to long in an Untriaged state. Confirmed Reproducible Version 49.0a2 Build ID 20160714004054 User Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 Version 50.0a1 Build ID 20160714030208
Status: UNCONFIRMED → NEW
Component: Untriaged → JavaScript Engine
Ever confirmed: true
Flags: needinfo?(bugzilla)
Product: Firefox → Core
Michelle - I'm not sure what you're asking me. I've been working on the WebCryptoAPI test suite for Test the Web Forward and reporting bugs as I find them. Do you need more details of this one?
Component: JavaScript Engine → DOM: Security
Flags: needinfo?(bugzilla)
Component: DOM: Security → Security
Component: Security → DOM: Security
Component: DOM: Security → Security
Component: Security → Security: PSM
Priority: -- → P3
Whiteboard: [psm-backlog]
Assignee: nobody → bugs
Status: NEW → ASSIGNED
Pushed by rmaries@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/73f73d6d927f throw correct error when encrypting with a bad AES-GCM tag length r=keeler
Pushed by btara@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/66821b7b0179 throw correct error when encrypting with a bad AES-GCM tag length r=keeler
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: