func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int sa_get_record_timestamp_struct(uint64_t l_flags, struct record_header *record_hdr, struct tm *rectime) { struct tm *ltm; int rc = 0; /* * Fill generic rectime structure in local time. * Done so that we have some default values. */ ltm = localtime_r((const time_t *) &(record_hdr->ust_time), rectime...
0
[ "CWE-415" ]
sysstat
a5c8abd4a481ee6e27a3acf00e6d9b0f023e20ed
143,499,772,908,278,040,000,000,000,000,000,000,000
33
Fix #242: Double free in check_file_actlst() Avoid freeing buffer() twice. Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
static void iommu_set_root_entry(struct intel_iommu *iommu) { u64 addr; u32 sts; unsigned long flag; addr = virt_to_phys(iommu->root_entry); if (ecs_enabled(iommu)) addr |= DMA_RTADDR_RTT; raw_spin_lock_irqsave(&iommu->register_lock, flag); dmar_writeq(iommu->reg + DMAR_RTADDR_REG, addr); writel(iommu->gcm...
0
[]
linux
fb58fdcd295b914ece1d829b24df00a17a9624bc
260,580,530,492,371,940,000,000,000,000,000,000,000
21
iommu/vt-d: Do not enable ATS for untrusted devices Currently Linux automatically enables ATS (Address Translation Service) for any device that supports it (and IOMMU is turned on). ATS is used to accelerate DMA access as the device can cache translations locally so there is no need to do full translation on IOMMU sid...
xfs_agfl_read_verify( struct xfs_buf *bp) { struct xfs_mount *mp = bp->b_mount; xfs_failaddr_t fa; /* * There is no verification of non-crc AGFLs because mkfs does not * initialise the AGFL to zero or NULL. Hence the only valid part of the * AGFL is what the AGF says is active. We can't get to the AGF, so we...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
d0c7feaf87678371c2c09b3709400be416b2dc62
83,603,769,948,588,520,000,000,000,000,000,000,000
23
xfs: add agf freeblocks verify in xfs_agf_verify We recently used fuzz(hydra) to test XFS and automatically generate tmp.img(XFS v5 format, but some metadata is wrong) xfs_repair information(just one AG): agf_freeblks 0, counted 3224 in ag 0 agf_longest 536874136, counted 3224 in ag 0 sb_fdblocks 613, counted 3228 T...
static Image *ReadTEXTImage(const ImageInfo *image_info, ExceptionInfo *exception) { char filename[MaxTextExtent], geometry[MaxTextExtent], *p, text[MaxTextExtent]; DrawInfo *draw_info; Image *image, *texture; MagickBooleanType status; PointInfo delta; RectangleInf...
0
[ "CWE-401" ]
ImageMagick6
210474b2fac6a661bfa7ed563213920e93e76395
108,891,002,703,829,930,000,000,000,000,000,000,000
198
Fix ultra rare but potential memory-leak
xps_draw_radial_gradient(xps_document *doc, const fz_matrix *ctm, const fz_rect *area, struct stop *stops, int count, fz_xml *root, int spread) { float x0, y0, r0; float x1, y1, r1; float xrad = 1; float yrad = 1; float invscale; int i, ma = 1; fz_matrix local_ctm = *ctm; fz_matrix inv; fz_rect local_area = ...
0
[ "CWE-119" ]
mupdf
60dabde18d7fe12b19da8b509bdfee9cc886aafc
26,995,002,086,141,220,000,000,000,000,000,000,000
78
Bug 694957: fix stack buffer overflow in xps_parse_color xps_parse_color happily reads more than FZ_MAX_COLORS values out of a ContextColor array which overflows the passed in samples array. Limiting the number of allowed samples to FZ_MAX_COLORS and make sure to use that constant for all callers fixes the problem. T...
int http_skip_chunk_crlf(struct buffer *buf, struct http_msg *msg) { char *ptr; int bytes; /* NB: we'll check data availabilty at the end. It's not a * problem because whatever we match first will be checked * against the correct length. */ bytes = 1; ptr = buf->lr; if (*ptr == '\r') { bytes++; ptr++; ...
0
[]
haproxy-1.4
dc80672211e085c211f1fc47e15cfe57ab587d38
189,455,040,529,961,630,000,000,000,000,000,000,000
36
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
void ib_uverbs_wq_event_handler(struct ib_event *event, void *context_ptr) { struct ib_uevent_object *uobj = container_of(event->element.wq->uobject, struct ib_uevent_object, uobject); ib_uverbs_async_handler(context_ptr, uobj->uobject.user_handle, event->event, &uobj->event_list, &uobj->events_repor...
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
79,111,025,769,984,340,000,000,000,000,000,000,000
9
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...
Status FillCollectiveParams(CollectiveParams* col_params, CollectiveType collective_type, const Tensor& group_size, const Tensor& group_key, const Tensor& instance_key) { if (group_size.dims() > 0) { return errors::Int...
1
[ "CWE-416" ]
tensorflow
ca38dab9d3ee66c5de06f11af9a4b1200da5ef75
53,889,960,801,950,790,000,000,000,000,000,000,000
33
Fix undefined behavior in CollectiveReduceV2 and others We should not call done after it's moved. PiperOrigin-RevId: 400838185 Change-Id: Ifc979740054b8f8c6f4d50acc89472fe60c4fdb1
void restore_tm_state(struct pt_regs *regs) { unsigned long msr_diff; clear_thread_flag(TIF_RESTORE_TM); if (!MSR_TM_ACTIVE(regs->msr)) return; msr_diff = current->thread.ckpt_regs.msr & ~regs->msr; msr_diff &= MSR_FP | MSR_VEC | MSR_VSX; if (msr_diff & MSR_FP) { fp_enable(); load_fp_state(&current->threa...
0
[ "CWE-284" ]
linux
7f821fc9c77a9b01fe7b1d6e72717b33d8d64142
88,888,525,961,487,030,000,000,000,000,000,000,000
21
powerpc/tm: Check for already reclaimed tasks Currently we can hit a scenario where we'll tm_reclaim() twice. This results in a TM bad thing exception because the second reclaim occurs when not in suspend mode. The scenario in which this can happen is the following. We attempt to deliver a signal to userspace. To ...
deep_count_start (NautilusDirectory *directory, NautilusFile *file, gboolean *doing_io) { GFile *location; DeepCountState *state; if (directory->details->deep_count_in_progress != NULL) { *doing_io = TRUE; return; } if (!is_needy (file, lacks_deep_count, REQUEST_DEEP_COUNT)) { re...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
29,918,755,031,605,714,000,000,000,000,000,000,000
49
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
hstore_each(PG_FUNCTION_ARGS) { FuncCallContext *funcctx; HStore *hs; int i; if (SRF_IS_FIRSTCALL()) { hs = PG_GETARG_HS(0); funcctx = SRF_FIRSTCALL_INIT(); setup_firstcall(funcctx, hs, fcinfo); } funcctx = SRF_PERCALL_SETUP(); hs = (HStore *) funcctx->user_fctx; i = funcctx->call_cntr; if (i < ...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
248,043,825,676,231,000,000,000,000,000,000,000,000
51
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
notationDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId) { callbacks++; if (quiet) return; fprintf(SAXdebug, "SAX.notationDecl(%s, %s, %s)\n", (char *) name, (char *) publicId, (char *) systemId); }
0
[ "CWE-125" ]
libxml2
a820dbeac29d330bae4be05d9ecd939ad6b4aa33
117,934,056,072,746,520,000,000,000,000,000,000,000
9
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.s...
remote_filter_free (RemoteFilter *remote_filter) { g_free (remote_filter->checksum); g_object_unref (remote_filter->path); if (remote_filter->allow) g_regex_unref (remote_filter->allow); if (remote_filter->deny) g_regex_unref (remote_filter->deny); g_free (remote_filter); }
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
66,189,740,078,220,240,000,000,000,000,000,000,000
11
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
int rtnl_af_register(struct rtnl_af_ops *ops) { int err; rtnl_lock(); err = __rtnl_af_register(ops); rtnl_unlock(); return err; }
0
[ "CWE-399" ]
linux-2.6
84d73cd3fb142bf1298a8c13fd4ca50fd2432372
329,404,797,623,998,870,000,000,000,000,000,000,000
9
rtnl: fix info leak on RTM_GETLINK request for VF devices Initialize the mac address buffer with 0 as the driver specific function will probably not fill the whole buffer. In fact, all in-kernel drivers fill only ETH_ALEN of the MAX_ADDR_LEN bytes, i.e. 6 of the 32 possible bytes. Therefore we currently leak 26 bytes ...
u32 gf_media_nalu_is_start_code(GF_BitStream *bs) { u8 s1, s2, s3, s4; Bool is_sc = 0; u64 pos = gf_bs_get_position(bs); s1 = gf_bs_read_int(bs, 8); s2 = gf_bs_read_int(bs, 8); if (!s1 && !s2) { s3 = gf_bs_read_int(bs, 8); if (s3==0x01) is_sc = 3; else if (!s3) { s4 = gf_bs_read_int(bs, 8); if (s4==0x...
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
236,792,231,667,398,800,000,000,000,000,000,000,000
18
fix some exploitable overflows (#994, #997)
finish_input_bmp(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) { /* no work */ }
0
[ "CWE-369" ]
libjpeg-turbo
43e84cff1bb2bd8293066f6ac4eb0df61ddddbc6
197,714,846,886,192,500,000,000,000,000,000,000,000
4
tjLoadImage(): Fix FPE triggered by malformed BMP In rdbmp.c, it is necessary to guard against 32-bit overflow/wraparound when allocating the row buffer, because since BMP files have 32-bit width and height fields, the value of biWidth can be up to 4294967295. Specifically, if biWidth is 1073741824 and cinfo->input_co...
int usbnet_status_start(struct usbnet *dev, gfp_t mem_flags) { int ret = 0; WARN_ON_ONCE(dev->interrupt == NULL); if (dev->interrupt) { mutex_lock(&dev->interrupt_mutex); if (++dev->interrupt_count == 1) ret = usb_submit_urb(dev->interrupt, mem_flags); dev_dbg(&dev->udev->dev, "incremented interrupt URB ...
0
[ "CWE-703" ]
linux
1666984c8625b3db19a9abc298931d35ab7bc64b
72,731,494,048,624,150,000,000,000,000,000,000,000
17
usbnet: cleanup after bind() in probe() In case bind() works, but a later error forces bailing in probe() in error cases work and a timer may be scheduled. They must be killed. This fixes an error case related to the double free reported in http://www.spinics.net/lists/netdev/msg367669.html and needs to go on top of L...
handle_server_data_anonymous_mech (DBusAuth *auth, const DBusString *data) { if (_dbus_string_get_length (data) > 0) { /* Client is allowed to send "trace" data, the only defined * meaning is that if it contains '@' it is an email address, * and oth...
0
[ "CWE-59" ]
dbus
47b1a4c41004bf494b87370987b222c934b19016
283,209,633,783,270,480,000,000,000,000,000,000,000
41
auth: Reject DBUS_COOKIE_SHA1 for users other than the server owner The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership of a shared home directory by having the server write a secret "cookie" into a .dbus-keyrings subdirectory of the desired identity's home directory with 0700 permissions, and having...
GF_Box *lsrc_New() { ISOM_DECL_BOX_ALLOC(GF_LASERConfigurationBox, GF_ISOM_BOX_TYPE_LSRC); return (GF_Box *)tmp;
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
37,304,567,322,129,055,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
static void printResult(cl_ulong4 seed, cl_ulong round, result r, cl_uchar score, const std::chrono::time_point<std::chrono::steady_clock> & timeStart, const Mode & mode) { // Time delta const auto seconds = std::chrono::duration_cast<std::chrono::seconds>(std::chrono::steady_clock::now() - timeStart).count(); // F...
0
[ "CWE-703" ]
profanity
69ff010c14ff80ec14246772db6a245aa59e6689
162,656,428,741,407,100,000,000,000,000,000,000,000
28
[FIX] pritive key seed .
void stop_dispatching(JSObject *self) { MOZ_ASSERT(is_dispatching(self)); JS::SetReservedSlot(self, Slots::Dispatch, JS::FalseValue()); }
0
[ "CWE-94" ]
js-compute-runtime
65524ffc962644e9fc39f4b368a326b6253912a9
162,423,531,228,841,920,000,000,000,000,000,000,000
4
use rangom_get instead of arc4random as arc4random does not work correctly with wizer wizer causes the seed in arc4random to be the same between executions which is not random
static unsigned long atalk_sum_skb(const struct sk_buff *skb, int offset, int len, unsigned long sum) { int start = skb_headlen(skb); struct sk_buff *frag_iter; int i, copy; /* checksum stuff in header space */ if ((copy = start - offset) > 0) { if (copy > len) copy = len; sum = atalk_sum_partial(sk...
0
[ "CWE-276" ]
linux
6cc03e8aa36c51f3b26a0d21a3c4ce2809c842ac
209,322,408,835,058,400,000,000,000,000,000,000,000
64
appletalk: enforce CAP_NET_RAW for raw sockets When creating a raw AF_APPLETALK socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Ori Nimron <orinimron123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
static inline bool nested_exit_on_init(struct vcpu_svm *svm) { return vmcb_is_intercept(&svm->nested.ctl, INTERCEPT_INIT); }
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
231,946,343,071,023,440,000,000,000,000,000,000,000
4
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
Status TrySimplify(NodeDef* reduction_node, string* simplified_node_name) override { if (IsInPreserveSet(*reduction_node)) return Status::OK(); // Input 0 (data) of the reduction node must be a tf.gather() on the 0th // axis. NodeDef* gather_node = nullptr; TF_RETURN_IF_ERROR...
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
27,369,739,750,341,950,000,000,000,000,000,000,000
50
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
static const char *am_set_setenv_slot(cmd_parms *cmd, void *struct_ptr, const char *newName, const char *oldName) { am_dir_cfg_rec *d = (am_dir_cfg_rec *)struct_ptr; /* Configure as prefixed attribu...
0
[ "CWE-601" ]
mod_auth_mellon
9d28908e28ef70a12196c215503fb0075e1fd7f3
304,885,602,723,487,400,000,000,000,000,000,000,000
13
Add MellonRedirectDomains option. Limit the domains that we will redirect to after login / logout to a set of trusted domains. By default we only allow redirects to the current domain. This change breaks backwards compatibility with any site that relies on redirects to separate domains. Fixes #35
static const char *set_access_name(cmd_parms *cmd, void *dummy, const char *arg) { void *sconf = cmd->server->module_config; core_server_config *conf = ap_get_core_module_config(sconf); const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE); if (err != NULL)...
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
42,337,004,762,618,180,000,000,000,000,000,000,000
14
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
void Server::addLink(Channel *c, Channel *l) { c->link(l); if (c->bTemporary || l->bTemporary) return; TransactionHolder th; QSqlQuery &query = *th.qsqQuery; SQLPREP("INSERT INTO `%1channel_links` (`server_id`, `channel_id`, `link_id`) VALUES (?,?,?)"); query.addBindValue(iServerNum); query.addBindValue(c->i...
0
[ "CWE-20" ]
mumble
6b33dda344f89e5a039b7d79eb43925040654242
136,508,939,705,847,150,000,000,000,000,000,000,000
19
Don't crash on long usernames
static bool tight_can_send_png_rect(VncState *vs, int w, int h) { if (vs->tight->type != VNC_ENCODING_TIGHT_PNG) { return false; } if (surface_bytes_per_pixel(vs->vd->ds) == 1 || vs->client_pf.bytes_per_pixel == 1) { return false; } return true; }
0
[ "CWE-401" ]
qemu
6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0
284,289,414,415,156,200,000,000,000,000,000,000,000
13
vnc: fix memory leak when vnc disconnect Currently when qemu receives a vnc connect, it creates a 'VncState' to represent this connection. In 'vnc_worker_thread_loop' it creates a local 'VncState'. The connection 'VcnState' and local 'VncState' exchange data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'. ...
static inline int i40e_setup_hw_channel(struct i40e_pf *pf, struct i40e_vsi *vsi, struct i40e_channel *ch, u16 uplink_seid, u8 type) { int ret; ch->initialized = false; ch->base_queue = vsi->next_base_queue; ch->type = type; /* Proceed with creation of channel (VMDq2) VSI */ ret = i40e_add_channe...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
207,011,958,623,867,320,000,000,000,000,000,000,000
41
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
static void exec_command_done(ExecCommand *c) { assert(c); c->path = mfree(c->path); c->argv = strv_free(c->argv); }
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
117,653,389,487,846,100,000,000,000,000,000,000,000
6
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
void WebContents::DownloadURL(const GURL& url) { auto* browser_context = web_contents()->GetBrowserContext(); auto* download_manager = content::BrowserContext::GetDownloadManager(browser_context); std::unique_ptr<download::DownloadUrlParameters> download_params( content::DownloadRequestUtils::CreateDo...
0
[ "CWE-284", "CWE-693" ]
electron
18613925610ba319da7f497b6deed85ad712c59b
275,298,459,711,571,800,000,000,000,000,000,000,000
9
refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL * spec: add test for x-site _top navigation * chore: old cod...
rad_cvt_int(const void *data) { u_int32_t value; memcpy(&value, data, sizeof value); return ntohl(value); }
0
[ "CWE-119", "CWE-787" ]
php-radius
13c149b051f82b709e8d7cc32111e84b49d57234
278,848,233,905,468,460,000,000,000,000,000,000,000
7
Fix a security issue in radius_get_vendor_attr(). The underlying rad_get_vendor_attr() function assumed that it would always be given valid VSA data. Indeed, the buffer length wasn't even passed in; the assumption was that the length field within the VSA structure would be valid. This could result in denial of servic...
int bnx2x_setup_leading(struct bnx2x *bp) { if (IS_PF(bp)) return bnx2x_setup_queue(bp, &bp->fp[0], true); else /* VF */ return bnx2x_vfpf_setup_q(bp, &bp->fp[0], true); }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
16,644,354,521,103,460,000,000,000,000,000,000,000
7
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
int read_wvc_block (WavpackContext *wpc) { WavpackStream *wps = wpc->streams [wpc->current_stream]; int64_t bcount, file2pos; WavpackHeader orig_wphdr; WavpackHeader wphdr; int compare_result; while (1) { file2pos = wpc->reader->get_pos (wpc->wvc_in); bcount = read_next_header (...
0
[ "CWE-125" ]
WavPack
4bc05fc490b66ef2d45b1de26abf1455b486b0dc
106,973,865,621,355,460,000,000,000,000,000,000,000
68
fixes for 4 fuzz failures posted to SourceForge mailing list
static inline int bond_slave_override(struct bonding *bond, struct sk_buff *skb) { int i, res = 1; struct slave *slave = NULL; struct slave *check_slave; if (!skb->queue_mapping) return 1; /* Find out if any slaves have the same mapping as this skb. */ bond_for_each_slave(bond, check_slave, i) { i...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
206,868,879,236,461,420,000,000,000,000,000,000,000
26
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static int tree_entry_interesting(struct tree_desc *desc, const char *base, int baselen, struct diff_options *opt) { const char *path; const unsigned char *sha1; unsigned mode; int i; int pathlen; int never_interesting = -1; if (!opt->nr_paths) return 1; sha1 = tree_entry_extract(desc, &path, &mode); path...
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
69,693,860,731,494,760,000,000,000,000,000,000,000
98
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
static int __net_init sctp_ctrlsock_init(struct net *net) { int status; /* Initialize the control inode/socket for handling OOTB packets. */ status = sctp_ctl_sock_init(net); if (status) pr_err("Failed to initialize the SCTP control sock\n"); return status; }
0
[ "CWE-119", "CWE-787" ]
linux
8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4
81,472,219,333,576,450,000,000,000,000,000,000,000
11
sctp: fix race on protocol/netns initialization Consider sctp module is unloaded and is being requested because an user is creating a sctp socket. During initialization, sctp will add the new protocol type and then initialize pernet subsys: status = sctp_v4_protosw_init(); if (status) ...
int btrfs_search_old_slot(struct btrfs_root *root, const struct btrfs_key *key, struct btrfs_path *p, u64 time_seq) { struct btrfs_fs_info *fs_info = root->fs_info; struct extent_buffer *b; int slot; int ret; int err; int level; int lowest_unlock = 1; u8 lowest_level = 0; lowest_level = p->lowest_level; ...
0
[ "CWE-362" ]
linux
dbcc7d57bffc0c8cac9dac11bec548597d59a6a5
8,869,117,548,569,977,000,000,000,000,000,000,000
91
btrfs: fix race when cloning extent buffer during rewind of an old root While resolving backreferences, as part of a logical ino ioctl call or fiemap, we can end up hitting a BUG_ON() when replaying tree mod log operations of a root, triggering a stack trace like the following: ------------[ cut here ]------------ ...
fix_assignment_words (words) WORD_LIST *words; { WORD_LIST *w, *wcmd; struct builtin *b; int assoc; if (words == 0) return; b = 0; assoc = 0; wcmd = words; for (w = words; w; w = w->next) if (w->word->flags & W_ASSIGNMENT) { if (b == 0) { /* Posix (post-2008) says that `co...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
252,403,824,827,696,700,000,000,000,000,000,000,000
58
commit bash-20120224 snapshot
UnicodeString::copyFrom(const UnicodeString &src, UBool fastCopy) { // if assigning to ourselves, do nothing if(this == &src) { return *this; } // is the right side bogus? if(src.isBogus()) { setToBogus(); return *this; } // delete the current contents releaseArray(); if(src.isEmpty()) ...
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
304,550,123,016,949,600,000,000,000,000,000,000,000
76
ICU-20958 Prevent SEGV_MAPERR in append See #971
size_t parse_core(const char *s, size_t n, SemanticValues &sv, Context & /*c*/, any &dt) const override { assert(fn_); return fn_(s, n, sv, dt); }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
40,414,186,725,827,560,000,000,000,000,000,000,000
5
Fix #122
rtadv_init (struct zebra_vrf *zvrf) { zvrf->rtadv.sock = rtadv_make_socket (zvrf->vrf_id); }
0
[ "CWE-119", "CWE-787" ]
quagga
cfb1fae25f8c092e0d17073eaf7bd428ce1cd546
178,806,735,969,894,150,000,000,000,000,000,000,000
4
zebra: stack overrun in IPv6 RA receive code (CVE-2016-1245) The IPv6 RA code also receives ICMPv6 RS and RA messages. Unfortunately, by bad coding practice, the buffer size specified on receiving such messages mixed up 2 constants that in fact have different values. The code itself has: #define RTADV_MSG_SIZE 4096 ...
Field *Field::make_new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type __attribute__((unused))) { Field *tmp; if (!(tmp= (Field*) memdup_root(root,(char*) this,size_of()))) return 0; if (tmp->table->maybe_null) tmp->flags&= ~NOT_NULL_FLAG; tmp->table= new_table; tm...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
31,956,181,316,074,860,000,000,000,000,000,000,000
23
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static uint32_t fdctrl_read (void *opaque, uint32_t reg) { FDCtrl *fdctrl = opaque; uint32_t retval; reg &= 7; switch (reg) { case FD_REG_SRA: retval = fdctrl_read_statusA(fdctrl); break; case FD_REG_SRB: retval = fdctrl_read_statusB(fdctrl); break; case FD_R...
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
101,573,293,479,976,000,000,000,000,000,000,000,000
36
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index i...
TPMT_KDF_SCHEME_Unmarshal(TPMT_KDF_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull) { TPM_RC rc = TPM_RC_SUCCESS; if (rc == TPM_RC_SUCCESS) { rc = TPMI_ALG_KDF_Unmarshal(&target->scheme, buffer, size, allowNull); } if (rc == TPM_RC_SUCCESS) { rc = TPMU_KDF_SCHEME_Unmarshal(&target->details...
0
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
216,508,979,686,384,170,000,000,000,000,000,000,000
12
tpm2: Restore original value if unmarshalled value was illegal Restore the original value of the memory location where data from a stream was unmarshalled and the unmarshalled value was found to be illegal. The goal is to not keep illegal values in memory. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static void bnx2x_cmng_fns_init(struct bnx2x *bp, u8 read_cfg, u8 cmng_type) { struct cmng_init_input input; memset(&input, 0, sizeof(struct cmng_init_input)); input.port_rate = bp->link_vars.line_speed; if (cmng_type == CMNG_FNS_MINMAX && input.port_rate) { int vn; /* read mf conf from shmem */ if (read_c...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
101,017,993,665,850,380,000,000,000,000,000,000,000
34
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
RI_FKey_fk_upd_check_required(Trigger *trigger, Relation fk_rel, HeapTuple old_row, HeapTuple new_row) { const RI_ConstraintInfo *riinfo; /* * Get arguments. */ riinfo = ri_FetchConstraintInfo(trigger, fk_rel, false); switch (riinfo->confmatchtype) { case FKCONSTR_MATCH_SIMPLE: /* * If any...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
313,698,671,624,095,900,000,000,000,000,000,000,000
93
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
PeiStartupAllAPs ( IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_MP_SERVICES_PPI *This, IN EFI_AP_PROCEDURE Procedure, IN BOOLEAN SingleThread, IN UINTN TimeoutInMicroSeconds, IN VOID *ProcedureArgument OPTIONAL ...
0
[ "CWE-787" ]
edk2
0a0d5296e448fc350de1594c49b9c0deff7fad60
36,589,335,960,978,084,000,000,000,000,000,000,000
18
UefiCpuPkg/CpuMpPei: support stack guard feature This feature is the same as Stack Guard enabled in driver CpuDxe but applies to PEI phase. Due to the specialty in PEI module dispatching, this driver is changed to do the actual initialization in notify callback of event gEfiPeiMemoryDiscoveredPpiGuid. This can let the...
connection_dirserv_finish_spooling(dir_connection_t *conn) { if (conn->zlib_state) { connection_write_to_buf_zlib("", 0, conn, 1); tor_zlib_free(conn->zlib_state); conn->zlib_state = NULL; } conn->dir_spool_src = DIR_SPOOL_NONE; return 0; }
0
[ "CWE-264" ]
tor
00fffbc1a15e2696a89c721d0c94dc333ff419ef
88,666,108,673,533,980,000,000,000,000,000,000,000
10
Don't give the Guard flag to relays without the CVE-2011-2768 fix
m4_dumpdef (struct obstack *obs, int argc, token_data **argv) { symbol *s; int i; struct dump_symbol_data data; const builtin *bp; data.obs = obs; data.base = (symbol **) obstack_base (obs); data.size = 0; if (argc == 1) { hack_all_symbols (dump_symbol, &data); } else { for (...
0
[]
m4
5345bb49077bfda9fabd048e563f9e7077fe335d
268,247,597,836,390,130,000,000,000,000,000,000,000
67
Minor security fix: Quote output of mkstemp. * src/builtin.c (mkstemp_helper): Produce quoted output. * doc/m4.texinfo (Mkstemp): Update the documentation and tests. * NEWS: Document this change. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba)
static void neigh_proxy_process(unsigned long arg) { struct neigh_table *tbl = (struct neigh_table *)arg; long sched_next = 0; unsigned long now = jiffies; struct sk_buff *skb; spin_lock(&tbl->proxy_queue.lock); skb = tbl->proxy_queue.next; while (skb != (struct sk_buff *)&tbl->proxy_queue) { struct sk_buff...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
29,566,678,190,055,754,000,000,000,000,000,000,000
33
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
const T* data(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int c=0) const { return _data + x + (ulongT)y*_width + (ulongT)z*_width*_height + (ulongT)c*_width*_height*_depth; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
227,219,577,512,646,250,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
brcmf_msgbuf_process_ioctl_complete(struct brcmf_msgbuf *msgbuf, void *buf) { struct msgbuf_ioctl_resp_hdr *ioctl_resp; ioctl_resp = (struct msgbuf_ioctl_resp_hdr *)buf; msgbuf->ioctl_resp_status = (s16)le16_to_cpu(ioctl_resp->compl_hdr.status); msgbuf->ioctl_resp_ret_len = le16_to_cpu(ioctl_resp->resp_len); ...
0
[ "CWE-20" ]
linux
a4176ec356c73a46c07c181c6d04039fafa34a9f
172,593,698,218,985,030,000,000,000,000,000,000,000
17
brcmfmac: add subtype check for event handling in data path For USB there is no separate channel being used to pass events from firmware to the host driver and as such are passed over the data path. In order to detect mock event messages an additional check is needed on event subtype. This check is added conditionally...
void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon, struct cifs_sb_info *cifs_sb, struct smb_vol *vol_info) { /* if we are reconnecting then should we check to see if * any requested capabilities changed locally e.g. via * remount but we can not do much about it here * if they have (even if ...
0
[ "CWE-703", "CWE-189" ]
linux
1fc29bacedeabb278080e31bb9c1ecb49f143c3b
22,709,255,992,680,950,000,000,000,000,000,000,000
99
cifs: fix off-by-one bug in build_unc_path_to_root commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change. One spot in build_unc_path_to_root wa...
void set_cron_uid(void) { #if defined(BSD) || defined(POSIX) if (seteuid(ROOT_UID) < OK) { perror("seteuid"); exit(ERROR_EXIT); } #else if (setuid(ROOT_UID) < OK) { perror("setuid"); exit(ERROR_EXIT); } #endif }
0
[ "CWE-476" ]
cronie
a6576769f01325303b11edc3e0cfb05ef382ce56
268,893,995,032,845,630,000,000,000,000,000,000,000
13
Fix CVE-2019-9704 and CVE-2019-9705 The users can cause DoS of the crond by loading huge crontab files. We now allow maximum 1000 environment variables and 1000 crontab entries. Also the comments and whitespace between the entries and variables are now limited to 32768 characters.
CImg<Tfloat> get_blur(const float sigma, const unsigned int boundary_conditions=1, const bool is_gaussian=true) const { return CImg<Tfloat>(*this,false).blur(sigma,boundary_conditions,is_gaussian); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
187,622,574,521,910,150,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
display_shell_version (count, c) int count, c; { rl_crlf (); show_shell_version (0); putc ('\r', rl_outstream); fflush (rl_outstream); rl_on_new_line (); rl_redisplay (); return 0; }
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
132,971,087,282,279,180,000,000,000,000,000,000,000
11
Bash-4.4 patch 7
static int phar_tar_octal(char *buf, uint32_t val, int len) /* {{{ */ { char *p = buf; int s = len; p += len; /* Start at the end and work backwards. */ while (s-- > 0) { *--p = (char)('0' + (val & 7)); val >>= 3; } if (val == 0) return SUCCESS; /* If it overflowed, fill field with max value. */ while...
0
[ "CWE-119" ]
php-src
e0f5d62bd6690169998474b62f92a8c5ddf0e699
96,932,303,581,064,740,000,000,000,000,000,000,000
20
Fix bug #77586 - phar_tar_writeheaders_int() buffer overflow
static int binder_thread_read(struct binder_proc *proc, struct binder_thread *thread, binder_uintptr_t binder_buffer, size_t size, binder_size_t *consumed, int non_block) { void __user *buffer = (void __user *)(uintptr_t)binder_buffer; void __user *ptr = buffer + *consumed; void __user *en...
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
163,274,491,142,912,400,000,000,000,000,000,000,000
388
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
mrb_instance_new(mrb_state *mrb, mrb_value cv) { mrb_value obj, blk; mrb_value *argv; mrb_int argc; mrb_sym init; mrb_method_t m; mrb_get_args(mrb, "*&", &argv, &argc, &blk); obj = mrb_instance_alloc(mrb, cv); init = mrb_intern_lit(mrb, "initialize"); m = mrb_method_search(mrb, mrb_class(mrb, obj), i...
0
[ "CWE-476", "CWE-415" ]
mruby
faa4eaf6803bd11669bc324b4c34e7162286bfa3
302,791,395,787,650,400,000,000,000,000,000,000,000
24
`mrb_class_real()` did not work for `BasicObject`; fix #4037
int bdrv_parse_discard_flags(const char *mode, int *flags) { *flags &= ~BDRV_O_UNMAP; if (!strcmp(mode, "off") || !strcmp(mode, "ignore")) { /* do nothing */ } else if (!strcmp(mode, "on") || !strcmp(mode, "unmap")) { *flags |= BDRV_O_UNMAP; } else { return -1; } return...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
73,936,532,243,607,740,000,000,000,000,000,000,000
14
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
qemuProcessReconnectHelper(virDomainObjPtr obj, void *opaque) { virThread thread; struct qemuProcessReconnectData *src = opaque; struct qemuProcessReconnectData *data; g_autofree char *name = NULL; /* If the VM was inactive, we don't need to reconnect */ if (!obj->pid...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
288,632,650,987,677,900,000,000,000,000,000,000,000
50
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
static void ext4_put_super(struct super_block *sb) { struct ext4_sb_info *sbi = EXT4_SB(sb); struct ext4_super_block *es = sbi->s_es; int i, err; ext4_unregister_li_request(sb); dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED); flush_workqueue(sbi->dio_unwritten_wq); destroy_workqueue(sbi->dio...
0
[ "CWE-703" ]
linux
0449641130f5652b344ef6fa39fa019d7e94660a
7,762,363,974,658,940,000,000,000,000,000,000,000
86
ext4: init timer earlier to avoid a kernel panic in __save_error_info During mount, when we fail to open journal inode or root inode, the __save_error_info will mod_timer. But actually s_err_report isn't initialized yet and the kernel oops. The detailed information can be found https://bugzilla.kernel.org/show_bug.cgi...
const char *libraw_strerror(int e) { enum LibRaw_errors errorcode = (LibRaw_errors)e; switch(errorcode) { case LIBRAW_SUCCESS: return "No error"; case LIBRAW_UNSPECIFIED_ERROR: return "Unspecified error"; ...
0
[ "CWE-119", "CWE-787" ]
LibRaw
2f912f5b33582961b1cdbd9fd828589f8b78f21d
260,030,817,327,681,500,000,000,000,000,000,000,000
35
fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef
int oidc_handle_redirect_uri_request(request_rec *r, oidc_cfg *c, oidc_session_t *session) { if (oidc_proto_is_redirect_authorization_response(r, c)) { /* this is an authorization response from the OP using the Basic Client profile or a Hybrid flow*/ return oidc_handle_redirect_authorization_response(r, c, ses...
1
[ "CWE-20" ]
mod_auth_openidc
612e309bfffd6f9b8ad7cdccda3019fc0865f3b4
146,101,632,360,201,360,000,000,000,000,000,000,000
74
don't echo query params on invalid requests to redirect URI; closes #212 thanks @LukasReschke; I'm sure there's some OWASP guideline that warns against this
decode_bits_in_field(const guint bit_offset, const gint no_of_bits, const guint64 value) { guint64 mask; char *str; int bit, str_p = 0; int i; int max_bits = MIN(64, no_of_bits); mask = G_GUINT64_CONSTANT(1) << (max_bits-1); /* Prepare the string, 256 pos for the bits and zero termination, + 64 for the spaces ...
0
[ "CWE-125" ]
wireshark
d5f2657825e63e4126ebd7d13a59f3c6e8a9e4e1
233,951,493,442,874,870,000,000,000,000,000,000,000
52
epan: Limit our bits in decode_bits_in_field. Limit the number of bits we process in decode_bits_in_field, otherwise we'll overrun our buffer. Fixes #16958.
static void rdma_umap_close(struct vm_area_struct *vma) { struct ib_uverbs_file *ufile = vma->vm_file->private_data; struct rdma_umap_priv *priv = vma->vm_private_data; if (!priv) return; /* * The vma holds a reference on the struct file that created it, which * in turn means that the ib_uverbs_file is guar...
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
45,730,067,775,992,040,000,000,000,000,000,000,000
18
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...
static void append_domain(int index, const char *domain) { update_domain(index, domain, true); }
0
[ "CWE-119" ]
connman
5c281d182ecdd0a424b64f7698f32467f8f67b71
204,906,634,749,982,760,000,000,000,000,000,000,000
4
dnsproxy: Fix crash on malformed DNS response If the response query string is malformed, we might access memory pass the end of "name" variable in parse_response().
asmlinkage long sys_sethostname(char __user *name, int len) { int errno; char tmp[__NEW_UTS_LEN]; if (!capable(CAP_SYS_ADMIN)) return -EPERM; if (len < 0 || len > __NEW_UTS_LEN) return -EINVAL; down_write(&uts_sem); errno = -EFAULT; if (!copy_from_user(tmp, name, len)) { memcpy(utsname()->nodename, tmp, l...
0
[ "CWE-20" ]
linux-2.6
9926e4c74300c4b31dee007298c6475d33369df0
318,400,137,120,926,630,000,000,000,000,000,000,000
19
CPU time limit patch / setrlimit(RLIMIT_CPU, 0) cheat fix As discovered here today, the change in Kernel 2.6.17 intended to inhibit users from setting RLIMIT_CPU to 0 (as that is equivalent to unlimited) by "cheating" and setting it to 1 in such a case, does not make a difference, as the check is done in the wrong pla...
static void virtnet_get_channels(struct net_device *dev, struct ethtool_channels *channels) { struct virtnet_info *vi = netdev_priv(dev); channels->combined_count = vi->curr_queue_pairs; channels->max_combined = vi->max_queue_pairs; channels->max_other = 0; channels->rx_count = 0; channels->tx_count = 0; c...
0
[ "CWE-119", "CWE-787" ]
linux
48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39
61,522,803,978,429,800,000,000,000,000,000,000,000
12
virtio-net: drop NETIF_F_FRAGLIST virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRA...
LZWPreDecode(TIFF* tif, uint16 s) { static const char module[] = "LZWPreDecode"; LZWCodecState *sp = DecoderState(tif); (void) s; assert(sp != NULL); if( sp->dec_codetab == NULL ) { tif->tif_setupdecode( tif ); if( sp->dec_codetab == NULL ) return (0); } /* * Check for old b...
0
[ "CWE-787" ]
libtiff
58a898cb4459055bb488ca815c23b880c242a27d
120,855,964,163,764,520,000,000,000,000,000,000,000
76
LZWDecodeCompat(): fix potential index-out-of-bounds write. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2780 / CVE-2018-8905 The fix consists in using the similar code LZWDecode() to validate we don't write outside of the output buffer.
archive_write_disk_set_acls(struct archive *a, int fd, const char *name, struct archive_acl *abstract_acl, __LA_MODE_T mode) { int ret = ARCHIVE_OK; (void)mode; /* UNUSED */ if ((archive_acl_types(abstract_acl) & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) { /* Solaris writes POSIX.1e access and default ACLs...
1
[ "CWE-59", "CWE-61" ]
libarchive
fba4f123cc456d2b2538f811bb831483bf336bad
55,274,404,642,822,320,000,000,000,000,000,000,000
25
Fix handling of symbolic link ACLs On Linux ACLs on symbolic links are not supported. We must avoid calling acl_set_file() on symbolic links as their targets are modified instead. While here, do not try to set default ACLs on non-directories. Fixes #1565
static void copy_buffer(int ssize, int max_sector, int max_sector_2) { int remaining; /* number of transferred 512-byte sectors */ struct bio_vec bv; char *dma_buffer; int size; struct req_iterator iter; max_sector = transfer_size(ssize, min(max_sector, max_sector_2), blk_rq_sectors(current_req));...
0
[ "CWE-416" ]
linux
233087ca063686964a53c829d547c7571e3f67bf
246,866,795,395,796,470,000,000,000,000,000,000,000
72
floppy: disable FDRAWCMD by default Minh Yuan reported a concurrency use-after-free issue in the floppy code between raw_cmd_ioctl and seek_interrupt. [ It turns out this has been around, and that others have reported the KASAN splats over the years, but Minh Yuan had a reproducer for it and so gets primary credi...
static int io_fsync(struct io_kiocb *req, bool force_nonblock) { loff_t end = req->sync.off + req->sync.len; int ret; /* fsync always requires a blocking context */ if (force_nonblock) return -EAGAIN; ret = vfs_fsync_range(req->file, req->sync.off, end > 0 ? end : LLONG_MAX, req->sync.flags & IORING_FS...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
164,614,796,642,400,890,000,000,000,000,000,000,000
17
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
runAndPrintExceptions(const boost::function<void ()> &func, bool toAbort) { try { func(); } catch (const boost::thread_interrupted &) { throw; } catch (const tracable_exception &e) { P_ERROR("Exception: " << e.what() << "\n" << e.backtrace()); if (toAbort) { abort(); } } }
0
[ "CWE-401" ]
passenger
94428057c602da3d6d34ef75c78091066ecac5c0
149,574,338,373,759,670,000,000,000,000,000,000,000
12
Fix a symlink-related security vulnerability. The fix in commit 34b10878 and contained a small attack time window in between two filesystem operations. This has been fixed.
xfs_attr_shortform_bytesfit(xfs_inode_t *dp, int bytes) { int offset; int minforkoff; /* lower limit on valid forkoff locations */ int maxforkoff; /* upper limit on valid forkoff locations */ int dsize; xfs_mount_t *mp = dp->i_mount; /* rounded down */ offset = (XFS_LITINO(mp, dp->i_d.di_version) - bytes) >> 3;...
0
[ "CWE-241", "CWE-19" ]
linux
8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
3,378,253,631,291,178,600,000,000,000,000,000,000
90
xfs: remote attribute overwrite causes transaction overrun Commit e461fcb ("xfs: remote attribute lookups require the value length") passes the remote attribute length in the xfs_da_args structure on lookup so that CRC calculations and validity checking can be performed correctly by related code. This, unfortunately h...
static fastpath_t vmx_exit_handlers_fastpath(struct kvm_vcpu *vcpu) { switch (to_vmx(vcpu)->exit_reason.basic) { case EXIT_REASON_MSR_WRITE: return handle_fastpath_set_msr_irqoff(vcpu); case EXIT_REASON_PREEMPTION_TIMER: return handle_fastpath_preemption_timer(vcpu); default: return EXIT_FASTPATH_NONE; } }
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
48,220,851,871,317,900,000,000,000,000,000,000,000
11
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
static my_bool showstat_handlerton(THD *thd, plugin_ref plugin, void *arg) { enum ha_stat_type stat= *(enum ha_stat_type *) arg; handlerton *hton= plugin_hton(plugin); if (hton->state == SHOW_OPTION_YES && hton->show_status && hton->show_status(hton, thd, stat_print, stat)...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
211,475,444,650,614,180,000,000,000,000,000,000,000
10
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
LogicalResult matchAndRewrite(TFL::AddOp add_op, PatternRewriter &rewriter) const override { // Match Add. DenseElementsAttr added_value; Value constant_val = add_op.rhs(); if (!matchPattern(constant_val, m_Constant(&added_value))) return failure(); // Match Fully ...
0
[ "CWE-476", "CWE-125" ]
tensorflow
d6b57f461b39fd1aa8c1b870f1b974aac3554955
327,957,790,863,345,900,000,000,000,000,000,000,000
90
Prevent nullptr dereference in MLIR TFLite dialect/optimizer. PiperOrigin-RevId: 387220762 Change-Id: Id136ef04bb3d36123b4685d316ae81a9ec924d6b
static void test_offset() { assert_true_rule( "rule test { strings: $a = \"ssi\" condition: @a == 2 }", "mississippi"); assert_true_rule( "rule test { strings: $a = \"ssi\" condition: @a == @a[1] }", "mississippi"); assert_true_rule( "rule test { strings: $a = \"ssi\" condition: @a...
0
[ "CWE-476", "CWE-703", "CWE-125" ]
yara
3119b232c9c453c98d8fa8b6ae4e37ba18117cd4
336,628,974,652,384,830,000,000,000,000,000,000,000
14
re_lexer: Make reading escape sequences more robust (#586) * Add test for issue #503 * re_lexer: Make reading escape sequences more robust This commit fixes parsing incomplete escape sequences at the end of a regular expression and parsing things like \xxy (invalid hex digits) which before were silently turned...
_gnutls_get_hash_block_len (gnutls_digest_algorithm_t algo) { switch (algo) { case GNUTLS_DIG_MD5: case GNUTLS_DIG_SHA1: case GNUTLS_DIG_RMD160: case GNUTLS_DIG_SHA256: case GNUTLS_DIG_SHA384: case GNUTLS_DIG_SHA512: case GNUTLS_DIG_SHA224: return 64; default: return 0;...
0
[ "CWE-310" ]
gnutls
458c67cf98740e7b12404f6c30e0d5317d56fd30
20,956,560,055,313,003,000,000,000,000,000,000,000
16
Fixes to avoid a timing attack in TLS CBC record parsing.
static void sco_conn_ready(struct sco_conn *conn) { struct sock *parent; struct sock *sk = conn->sk; BT_DBG("conn %p", conn); if (sk) { lock_sock(sk); sco_sock_clear_timer(sk); sk->sk_state = BT_CONNECTED; sk->sk_state_change(sk); release_sock(sk); } else { sco_conn_lock(conn); if (!conn->hcon) { ...
0
[ "CWE-416" ]
linux
0771cbb3b97d3c1d68eecd7f00055f599954c34e
22,388,886,189,032,200,000,000,000,000,000,000,000
58
Bluetooth: SCO: Replace use of memcpy_from_msg with bt_skb_sendmsg This makes use of bt_skb_sendmsg instead of allocating a different buffer to be used with memcpy_from_msg which cause one extra copy. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
QPDFWriter::writeLinearized() { // Optimize file and enqueue objects in order discardGeneration(this->m->object_to_object_stream, this->m->object_to_object_stream_no_gen); bool need_xref_stream = (! this->m->object_to_object_stream.empty()); this->m->pdf.optimize(this->m->object_...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
103,732,300,492,633,480,000,000,000,000,000,000,000
393
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
int LZ4_sizeofState() { return LZ4_STREAMSIZE; }
0
[ "CWE-20" ]
lz4
da5373197e84ee49d75b8334d4510689731d6e90
215,899,523,286,231,450,000,000,000,000,000,000,000
1
Fixed : issue 52 (reported by Ludwig Strigeus)
nautilus_file_mark_desktop_file_trusted (GFile *file, GtkWindow *parent_window, gboolean interactive, NautilusOpCallback done_callback, ...
1
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
264,983,255,663,411,820,000,000,000,000,000,000,000
20
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
blockconvLow(l_uint32 *data, l_int32 w, l_int32 h, l_int32 wpl, l_uint32 *dataa, l_int32 wpla, l_int32 wc, l_int32 hc) { l_int32 i, j, imax, imin, jmax, jmin; l_int32 wn, hn, fwc, fhc, wmwc, hmhc; l_floa...
1
[]
leptonica
480f5e74c24fdc2003c42a4e15d1f24c9e6ea469
38,543,645,203,376,385,000,000,000,000,000,000,000
117
Fixed issue 21972 (oss-fuzz) Divide by zero in pixBlockconvGray().
int f2fs_commit_super(struct f2fs_sb_info *sbi, bool recover) { struct buffer_head *sbh = sbi->raw_super_buf; struct buffer_head *bh; int err; /* write back-up superblock first */ bh = sb_getblk(sbi->sb, sbh->b_blocknr ? 0 : 1); if (!bh) return -EIO; lock_buffer(bh); memcpy(bh->b_data, sbh->b_data, sbh->b_s...
0
[ "CWE-787" ]
linux
9a59b62fd88196844cee5fff851bee2cfd7afb6e
128,881,112,590,356,250,000,000,000,000,000,000,000
33
f2fs: do more integrity verification for superblock Do more sanity check for superblock during ->mount. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static int SavePackageDescriptionToDebugDump(const char *dump_dir_name) { struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); if (!dd) return 1; char *analyzer = dd_load_text(dd, FILENAME_ANALYZER); if (!strcmp(analyzer, "Kerneloops")) { dd_save_text(dd, FILENAME_PACKAGE,...
0
[ "CWE-59" ]
abrt
fdf93685d4f3fc36fe50d34a11e24662c4cb2d8c
318,365,554,164,215,800,000,000,000,000,000,000,000
154
a-a-save-package-data: turn off reading data from root directories Making copies of files from arbitrary root directories is not secure. Related: #1211835 Signed-off-by: Jakub Filak <jfilak@redhat.com>
static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) { struct usb_device *hdev = hub->hdev; struct usb_hcd *hcd; int ret; int port1; int status; bool need_debounce_delay = false; unsigned delay; /* Continue a partial initialization */ if (type == HUB_INIT2 || type == HUB_INIT3) { dev...
0
[ "CWE-703" ]
linux
e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
119,488,251,864,184,680,000,000,000,000,000,000,000
250
USB: fix invalid memory access in hub_activate() Commit 8520f38099cc ("USB: change hub initialization sleeps to delayed_work") changed the hub_activate() routine to make part of it run in a workqueue. However, the commit failed to take a reference to the usb_hub structure or to lock the hub interface while doing so. ...
dse_prev_search_results(void *vp) { Slapi_PBlock *pb = (Slapi_PBlock *)vp; dse_search_set *ss; slapi_pblock_get(pb, SLAPI_SEARCH_RESULT_SET, &ss); if (ss) { dl_get_prev(&ss->dl, &ss->current_entry); } }
0
[ "CWE-200", "CWE-203" ]
389-ds-base
b6aae4d8e7c8a6ddd21646f94fef1bf7f22c3f32
132,092,816,148,783,750,000,000,000,000,000,000,000
9
Issue 4609 - CVE - info disclosure when authenticating Description: If you bind as a user that does not exist. Error 49 is returned instead of error 32. As error 32 discloses that the entry does not exist. When you bind as an entry that does not have userpassword set then ...
void JsonAssign(json &dest, const json &src) { #ifdef TINYGLTF_USE_RAPIDJSON dest.CopyFrom(src, GetAllocator()); #else dest = src; #endif }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
264,046,565,980,734,920,000,000,000,000,000,000,000
7
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
ArgJoin<wchar_t, It> join(It first, It last, const BasicCStringRef<wchar_t>& sep) { return ArgJoin<wchar_t, It>(first, last, sep); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
22,680,666,980,102,050,000,000,000,000,000,000,000
3
Fix segfault on complex pointer formatting (#642)
allocateCharacterClasses(CharacterClass **characterClasses, TranslationTableCharacterAttributes *characterClassAttribute) { /* Allocate memory for predifined character classes */ int k = 0; *characterClasses = NULL; *characterClassAttribute = 1; while (characterClassNames[k]) { widechar wname[MAXSTRING]; int...
0
[ "CWE-787" ]
liblouis
fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde
62,990,190,320,938,810,000,000,000,000,000,000,000
20
Fix yet another buffer overflow in the braille table parser Reported by Henri Salo Fixes #592
relay_crypt(circuit_t *circ, cell_t *cell, cell_direction_t cell_direction, crypt_path_t **layer_hint, char *recognized) { relay_header_t rh; tor_assert(circ); tor_assert(cell); tor_assert(recognized); tor_assert(cell_direction == CELL_DIRECTION_IN || cell_direction == CELL_DIRECTION...
0
[ "CWE-200", "CWE-617" ]
tor
56a7c5bc15e0447203a491c1ee37de9939ad1dcd
70,677,973,686,264,340,000,000,000,000,000,000,000
67
TROVE-2017-005: Fix assertion failure in connection_edge_process_relay_cell On an hidden service rendezvous circuit, a BEGIN_DIR could be sent (maliciously) which would trigger a tor_assert() because connection_edge_process_relay_cell() thought that the circuit is an or_circuit_t but is an origin circuit in reality. ...
SMB2_set_eof(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, u64 volatile_fid, u32 pid, __le64 *eof, bool is_falloc) { struct smb2_file_eof_info info; void *data; unsigned int size; info.EndOfFile = *eof; data = &info; size = sizeof(struct smb2_file_eof_info); if (is_falloc) return...
0
[ "CWE-476" ]
linux
cabfb3680f78981d26c078a26e5c748531257ebb
8,626,957,695,534,360,000,000,000,000,000,000,000
19
CIFS: Enable encryption during session setup phase In order to allow encryption on SMB connection we need to exchange a session key and generate encryption and decryption keys. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
static int mem_cgroup_oom_notify_cb(struct mem_cgroup *memcg) { struct mem_cgroup_eventfd_list *ev; list_for_each_entry(ev, &memcg->oom_notify, list) eventfd_signal(ev->eventfd, 1); return 0; }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
16,266,979,438,647,930,000,000,000,000,000,000,000
8
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
void nfs_commitdata_release(struct nfs_commit_data *data) { put_nfs_open_context(data->context); nfs_commit_free(data); }
0
[]
linux
c7559663e42f4294ffe31fe159da6b6a66b35d61
196,795,394,399,039,340,000,000,000,000,000,000,000
5
NFS: Allow nfs_updatepage to extend a write under additional circumstances Currently nfs_updatepage allows a write to be extended to cover a full page only if we don't have a byte range lock lock on the file... but if we have a write delegation on the file or if we have the whole file locked for writing then we should...
folder_list_update_cb (gpointer user_data) { struct ScheduleUpdateData *sud = user_data; g_return_val_if_fail (sud != NULL, FALSE); if (g_cancellable_is_cancelled (sud->cancellable)) return FALSE; g_return_val_if_fail (sud->ews_store != NULL, FALSE); g_return_val_if_fail (sud->ews_store->priv != NULL, FALSE);...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
208,803,372,700,612,760,000,000,000,000,000,000,000
26
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
void xpipe(int filedes[2]) { if (pipe(filedes)) perror_msg_and_die("Can't create pipe"); }
0
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
42,050,963,615,743,680,000,000,000,000,000,000,000
5
lib: fix races in dump directory handling code Florian Weimer <fweimer@redhat.com>: dd_opendir() should keep a file handle (opened with O_DIRECTORY) and use openat() and similar functions to access files in it. ... The file system manipulation functions should guard against hard links (check tha...
int __init arch_ioremap_pud_supported(void) { /* only 4k granule supports level 1 block mappings */ return IS_ENABLED(CONFIG_ARM64_4K_PAGES); }
0
[]
linux
15122ee2c515a253b0c66a3e618bc7ebe35105eb
150,602,948,917,095,930,000,000,000,000,000,000,000
5
arm64: Enforce BBM for huge IO/VMAP mappings ioremap_page_range doesn't honour break-before-make and attempts to put down huge mappings (using p*d_set_huge) over the top of pre-existing table entries. This leads to us leaking page table memory and also gives rise to TLB conflicts and spurious aborts, which have been s...