func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
vte_sequence_handler_mk (VteTerminal *terminal, GValueArray *params)
{
terminal->pvt->screen->defaults.attr.invisible = 1;
} | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 170,823,869,529,485,070,000,000,000,000,000,000,000 | 4 | fix bug #548272
svn path=/trunk/; revision=2365 |
static int mlx5_ib_umem_get(struct mlx5_ib_dev *dev,
struct ib_pd *pd,
unsigned long addr, size_t size,
struct ib_umem **umem,
int *npages, int *page_shift, int *ncont,
u32 *offset)
{
int err;
*umem = ib_umem_get(pd->uobject->context, addr, size, 0, 0);
if (IS_ERR(*umem)) {
mlx5... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 313,386,041,918,835,230,000,000,000,000,000,000,000 | 34 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
gboolean vnc_color_map_lookup(VncColorMap *map,
guint16 idx,
guint16 *red,
guint16 *green,
guint16 *blue)
{
if (idx < map->offset || idx >= (map->size + map->offset))
return FALSE;
*r... | 0 | [] | gtk-vnc | c8583fd3783c5b811590fcb7bae4ce6e7344963e | 138,646,569,126,229,490,000,000,000,000,000,000,000 | 15 | Correctly validate color map range indexes
The color map index could wrap around to zero causing negative
array index accesses.
https://bugzilla.gnome.org/show_bug.cgi?id=778050
CVE-2017-5885
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> |
static void mod_ua_on_tsx_state( pjsip_transaction *tsx, pjsip_event *e)
{
pjsip_dialog *dlg;
/* If the module id is -1, it could mean that the module has been
* destroyed.
*/
if (mod_ua.mod.id == -1)
return;
/* Get the dialog where this transaction belongs. */
dlg = (pjsip_dialog*) tsx... | 0 | [
"CWE-416"
] | pjproject | db3235953baa56d2fb0e276ca510fefca751643f | 176,931,045,361,928,100,000,000,000,000,000,000,000 | 22 | Merge pull request from GHSA-ffff-m5fm-qm62
* Update pjsip_ua_unregister_dlg():
- update the hash key if the dialog being unregistered is used as hash key.
- add an assertion check to make sure that the dlg_set to be removed is valid (can be found in the hash table).
* Change hash key string comparison method. |
static int ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
mul_function(&EX_T(opline->result.u.var).tmp_var,
&opline->op1.u.constant,
_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
ZEND_VM_NEXT_OPCODE();
} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 260,278,765,532,923,660,000,000,000,000,000,000,000 | 12 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
void setBearerToken(Http::RequestHeaderMap& headers, const std::string& token) {
headers.setInline(authorization_handle.handle(), absl::StrCat("Bearer ", token));
} | 0 | [
"CWE-416"
] | envoy | 7ffda4e809dec74449ebc330cebb9d2f4ab61360 | 283,241,537,846,338,600,000,000,000,000,000,000,000 | 3 | oauth2: do not blindly accept requests with a token in the Authorization headera (781)
The logic was broken because it assumed an additional call would be
performed to the auth server, which isn't the case. Per the filter
documentation, a request is only considered subsequently authenticated
if there's valid cookie th... |
static struct page **__iommu_get_pages(void *cpu_addr, struct dma_attrs *attrs)
{
struct vm_struct *area;
if (__in_atomic_pool(cpu_addr, PAGE_SIZE))
return __atomic_get_pages(cpu_addr);
if (dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs))
return cpu_addr;
area = find_vm_area(cpu_addr);
if (area && (area->fl... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 0ea1ec713f04bdfac343c9702b21cd3a7c711826 | 49,350,434,962,507,990,000,000,000,000,000,000,000 | 15 | ARM: dma-mapping: don't allow DMA mappings to be marked executable
DMA mapping permissions were being derived from pgprot_kernel directly
without using PAGE_KERNEL. This causes them to be marked with executable
permission, which is not what we want. Fix this.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk... |
int sqlite3KeyInfoIsWriteable(KeyInfo *p){ return p->nRef==1; } | 0 | [
"CWE-20"
] | sqlite | e59c562b3f6894f84c715772c4b116d7b5c01348 | 51,614,606,130,873,700,000,000,000,000,000,000,000 | 1 | Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list.
FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba |
static av_cold void uninit(AVFilterContext *ctx)
{
KerndeintContext *kerndeint = ctx->priv;
av_free(kerndeint->tmp_data[0]);
} | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | e43a0a232dbf6d3c161823c2e07c52e76227a1bc | 150,707,826,326,881,400,000,000,000,000,000,000,000 | 6 | avfilter: fix plane validity checks
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static gboolean cosine_read(wtap *wth, int *err, gchar **err_info,
gint64 *data_offset)
{
gint64 offset;
char line[COSINE_LINE_LENGTH];
/* Find the next packet */
offset = cosine_seek_next_packet(wth, err, err_info, line);
if (offset < 0)
return FALSE;
*data_offset = offset;
/* Parse the header and conve... | 0 | [
"CWE-119",
"CWE-787"
] | wireshark | a66628e425db725df1ac52a3c573a03357060ddd | 77,673,008,875,563,600,000,000,000,000,000,000,000 | 16 | Don't treat the packet length as unsigned.
The scanf family of functions are as annoyingly bad at handling unsigned
numbers as strtoul() is - both of them are perfectly willing to accept a
value beginning with a negative sign as an unsigned value. When using
strtoul(), you can compensate for this by explicitly checki... |
static inline bool tcp_packet_delayed(const struct tcp_sock *tp)
{
return !tp->retrans_stamp ||
tcp_tsopt_ecr_before(tp, tp->retrans_stamp);
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8b8a321ff72c785ed5e8b4cf6eda20b35d427390 | 97,550,441,759,933,260,000,000,000,000,000,000,000 | 5 | tcp: fix zero cwnd in tcp_cwnd_reduction
Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode
conditionally") introduced a bug that cwnd may become 0 when both
inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead
to a div-by-zero if the connection starts another cwnd reduction
phase by set... |
int saa7164_bus_setup(struct saa7164_dev *dev)
{
struct tmComResBusInfo *b = &dev->bus;
mutex_init(&b->lock);
b->Type = TYPE_BUS_PCIe;
b->m_wMaxReqSize = SAA_DEVICE_MAXREQUESTSIZE;
b->m_pdwSetRing = (u8 __iomem *)(dev->bmmio +
((u32)dev->busdesc.CommandRing));
b->m_dwSizeSetRing = SAA_DEVICE_BUFFERBLOCKS... | 0 | [
"CWE-125"
] | media-tree | 354dd3924a2e43806774953de536257548b5002c | 130,563,647,423,199,060,000,000,000,000,000,000,000 | 28 | [PATCH] saa7164: Bug - Double fetch PCIe access condition
Avoid a double fetch by reusing the values from the prior transfer.
Originally reported via https://bugzilla.kernel.org/show_bug.cgi?id=195559
Thanks to Pengfei Wang <wpengfeinudt@gmail.com> for reporting.
Signed-off-by: Steven Toth <stoth@kernellabs.com> |
main (int argc, char **argv)
{
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/errors/non_svg_element", test_non_svg_element);
g_test_add_data_func_full ("/errors/instancing_limit/323-nested-use.svg",
"323-nested-use.svg",
test_instancing_... | 1 | [
"CWE-400"
] | librsvg | 572f95f739529b865e2717664d6fefcef9493135 | 198,787,974,589,204,080,000,000,000,000,000,000,000 | 19 | (#515) - Add a limit for the number of loaded elements
This fixes the last part of #515, an enormous SVG file with millions
of elements, which causes out-of-memory.
To avoid unbounded memory consumption, we'll set a hard limit on the
number of loaded elements. The largest legitimate file I have is a
map rendering wi... |
static void ll_find_deltas(struct object_entry **list, unsigned list_size,
int window, int depth, unsigned *processed)
{
struct thread_params *p;
int i, ret, active_threads = 0;
init_threaded_search();
if (delta_search_threads <= 1) {
find_deltas(list, &list_size, window, depth, processed);
cleanup_thre... | 0 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 332,072,012,814,104,720,000,000,000,000,000,000,000 | 128 | list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and ... |
TEST_F(Http1ClientConnectionImplTest, ManyResponseHeadersAccepted) {
max_response_headers_count_ = 152;
initialize();
NiceMock<MockResponseDecoder> response_decoder;
Http::RequestEncoder& request_encoder = codec_->newStream(response_decoder);
TestRequestHeaderMapImpl headers{{":method", "GET"}, {":path", "/... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 178,388,229,437,734,180,000,000,000,000,000,000,000 | 16 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
int cli_checklimits(const char *who, cli_ctx *ctx, unsigned long need1, unsigned long need2, unsigned long need3) {
int ret = CL_SUCCESS;
unsigned long needed;
/* if called without limits, go on, unpack, scan */
if(!ctx) return CL_CLEAN;
needed = (need1>need2)?need1:need2;
needed = (needed>nee... | 0 | [] | clamav-devel | 167c0079292814ec5523d0b97a9e1b002bf8819b | 82,211,428,788,113,730,000,000,000,000,000,000,000 | 37 | fix 0.99.3 false negative of virus Pdf.Exploit.CVE_2016_1046-1. |
static int h2_parse_header_table_size(char **args, int section_type, struct proxy *curpx,
struct proxy *defpx, const char *file, int line,
char **err)
{
if (too_many_args(1, args, err, NULL))
return -1;
h2_settings_header_table_size = atoi... | 0 | [
"CWE-119"
] | haproxy | 3f0e1ec70173593f4c2b3681b26c04a4ed5fc588 | 38,622,182,375,410,800,000,000,000,000,000,000,000 | 14 | BUG/CRITICAL: h2: fix incorrect frame length check
The incoming H2 frame length was checked against the max_frame_size
setting instead of being checked against the bufsize. The max_frame_size
only applies to outgoing traffic and not to incoming one, so if a large
enough frame size is advertised in the SETTINGS frame, ... |
static MOBI_RET mobi_parse_index_entry(MOBIIndx *indx, const MOBIIdxt idxt, const MOBITagx *tagx, const MOBIOrdt *ordt, MOBIBuffer *buf, const size_t curr_number) {
if (indx == NULL) {
debug_print("%s", "INDX structure not initialized\n");
return MOBI_INIT_FAILED;
}
const size_t entry_offset... | 0 | [
"CWE-125"
] | libmobi | 612562bc1ea38f1708b044e7a079c47a05b1291d | 299,380,336,118,284,700,000,000,000,000,000,000,000 | 151 | Fix: index entry label not being zero-terminated with corrupt input |
int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
{
kuid_t euid;
kgid_t egid;
int id;
int next_id = ids->next_id;
if (size > IPCMNI)
size = IPCMNI;
if (ids->in_use >= size)
return -ENOSPC;
idr_preload(GFP_KERNEL);
spin_lock_init(&new->lock);
new->deleted = false;
rcu_read_lock();... | 0 | [
"CWE-362",
"CWE-401"
] | linux | b9a532277938798b53178d5a66af6e2915cb27cf | 189,430,966,304,454,360,000,000,000,000,000,000,000 | 48 | Initialize msg/shm IPC objects before doing ipc_addid()
As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before
having initialized the IPC object state. Yes, we initialize the IPC
object in a locked state, but with all the lockless RCU lookup work,
that IPC object lock no longer means that the state c... |
unsigned VvcUnit::extractUEGolombCode()
{
int cnt = 0;
for (; m_reader.getBits(1) == 0; cnt++)
;
if (cnt > INT_BIT)
THROW_BITSTREAM_ERR;
return (1 << cnt) - 1 + m_reader.getBits(cnt);
} | 0 | [
"CWE-22"
] | tsMuxer | 3763dd34755a8944d903aa19578fa22cd3734165 | 21,807,689,871,349,560,000,000,000,000,000,000,000 | 9 | Fix Buffer Overflow
Fixes issue #509. |
RemoteFsDevice::RemoteFsDevice(MusicLibraryModel *m, const DeviceOptions &options, const Details &d)
: FsDevice(m, d.name, createUdi(d.name))
, mountToken(0)
, currentMountStatus(false)
, details(d)
, proc(0)
, messageSent(false)
{
opts=options;
// details.path=Utils::fixPath(details.path... | 0 | [
"CWE-20",
"CWE-22"
] | cantata | afc4f8315d3e96574925fb530a7004cc9e6ce3d3 | 118,271,934,389,924,300,000,000,000,000,000,000,000 | 18 | Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested |
duint32 dwgCompressor::litLength21(duint8 *cbuf, duint8 oc, duint32 *si){
duint32 srcIndex=*si;
duint32 length = oc + 8;
if (length == 0x17) {
duint32 n = cbuf[srcIndex++];
length += n;
if (n == 0xff) {
do {
n = cbuf[srcIndex++];
n |= sta... | 1 | [
"CWE-191"
] | libdxfrw | 6417118874333309aa10c4e59f954c3905a6e8b5 | 218,867,073,774,992,660,000,000,000,000,000,000,000 | 20 | fixed heap buffer overflow vulnerability CVE-2021-21899
as reported in TALOS-2021-1350 / CVE-2021-21899,
dwgCompressor::decompress21() could be abused with a malformed DWG file
to force heap buffer overflow and possibly lead to malicious code
execution. |
void wc_ecc_free_curve(const ecc_set_type* curve, void* heap)
{
if (curve->prime != NULL)
XFREE((void*)curve->prime, heap, DYNAMIC_TYPE_ECC_BUFFER);
if (curve->Af != NULL)
XFREE((void*)curve->Af, heap, DYNAMIC_TYPE_ECC_BUFFER);
if (curve->Bf != NULL)
XFREE((void*)curve->Bf, heap, DYN... | 0 | [
"CWE-200"
] | wolfssl | 9b9568d500f31f964af26ba8d01e542e1f27e5ca | 179,796,372,770,814,200,000,000,000,000,000,000,000 | 19 | Change ECDSA signing to use blinding. |
xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset,
struct page **pages, unsigned int base, unsigned int len)
{
struct kvec *head = xdr->head;
struct kvec *tail = xdr->tail;
char *buf = (char *)head->iov_base;
unsigned int buflen = head->iov_len;
head->iov_len = offset;
xdr->pages = pages;
xdr->page... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 6d1c0f3d28f98ea2736128ed3e46821496dc3a8c | 132,418,434,172,468,910,000,000,000,000,000,000,000 | 18 | sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base()
This seems to happen fairly easily during READ_PLUS testing on NFS v4.2.
I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr
greater than the number of pages in the array. So let's just return
early if we're setting base to a poin... |
static int is_next_segment_free(struct f2fs_sb_info *sbi, int type)
{
struct curseg_info *curseg = CURSEG_I(sbi, type);
unsigned int segno = curseg->segno + 1;
struct free_segmap_info *free_i = FREE_I(sbi);
if (segno < MAIN_SEGS(sbi) && segno % sbi->segs_per_sec)
return !test_bit(segno, free_i->free_segmap);
re... | 0 | [
"CWE-20"
] | linux | 638164a2718f337ea224b747cf5977ef143166a4 | 286,923,549,525,297,540,000,000,000,000,000,000,000 | 10 | f2fs: fix potential panic during fstrim
As Ju Hyung Park reported:
"When 'fstrim' is called for manual trim, a BUG() can be triggered
randomly with this patch.
I'm seeing this issue on both x86 Desktop and arm64 Android phone.
On x86 Desktop, this was caused during Ubuntu boot-up. I have a
cronjob installed which c... |
setup_anchor(Node* node, regex_t* reg, int state, ScanEnv* env)
{
/* allowed node types in look-behind */
#define ALLOWED_TYPE_IN_LB \
( BIT_NODE_LIST | BIT_NODE_ALT | BIT_NODE_STRING | BIT_NODE_CCLASS \
| BIT_NODE_CTYPE | BIT_NODE_ANCHOR | BIT_NODE_ENCLOSURE | BIT_NODE_QUANT \
| BIT_NODE_CALL | BIT_NODE_GIMMICK)... | 0 | [
"CWE-476"
] | oniguruma | 410f5916429e7d2920e1d4867388514f605413b8 | 119,927,984,371,492,950,000,000,000,000,000,000,000 | 67 | fix #87: Read unknown address in onig_error_code_to_str() |
dissect_kafka_produce_request_partition(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
kafka_api_version_t api_version _U_)
{
proto_item *ti;
proto_tree *subtree;
guint len;
kafka_packet_values_t packet_values;
memset(&packet_values, 0, ... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 129,040,216,681,292,280,000,000,000,000,000,000,000 | 25 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
RegexMatchExpression::~RegexMatchExpression() {} | 0 | [
"CWE-190"
] | mongo | 21d8699ed6c517b45e1613e20231cd8eba894985 | 337,976,867,677,517,640,000,000,000,000,000,000,000 | 1 | SERVER-43699 $mod should not overflow for large negative values |
CheckCompoundAffixes(CMPDAffix **ptr, char *word, int len, bool CheckInPlace)
{
bool issuffix;
if (CheckInPlace)
{
while ((*ptr)->affix)
{
if (len > (*ptr)->len && strncmp((*ptr)->affix, word, (*ptr)->len) == 0)
{
len = (*ptr)->len;
issuffix = (*ptr)->issuffix;
(*ptr)++;
return (issuffix)... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 184,504,831,485,064,360,000,000,000,000,000,000,000 | 36 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
vte_sequence_handler_st (VteTerminal *terminal, GValueArray *params)
{
if (terminal->pvt->tabstops == NULL) {
terminal->pvt->tabstops = g_hash_table_new(NULL, NULL);
}
_vte_terminal_set_tabstop(terminal,
terminal->pvt->screen->cursor_current.col);
} | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 217,667,907,790,495,500,000,000,000,000,000,000,000 | 8 | fix bug #548272
svn path=/trunk/; revision=2365 |
const std::vector<fs::path>& getTestFiles() const {
return _testFiles;
} | 0 | [
"CWE-755"
] | mongo | 75f7184eafa78006a698cda4c4adfb57f1290047 | 119,508,997,396,655,650,000,000,000,000,000,000,000 | 3 | SERVER-50170 fix max staleness read preference parameter for server selection |
callbacks_edit_object_properties_clicked (GtkButton *button, gpointer user_data){
} | 0 | [
"CWE-200"
] | gerbv | 319a8af890e4d0a5c38e6d08f510da8eefc42537 | 129,071,679,209,343,840,000,000,000,000,000,000,000 | 2 | Remove local alias to parameter array
Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402 |
static int unimac_mdio_poll(void *wait_func_data)
{
struct unimac_mdio_priv *priv = wait_func_data;
unsigned int timeout = 1000;
do {
if (!unimac_mdio_busy(priv))
return 0;
usleep_range(1000, 2000);
} while (--timeout);
if (!timeout)
return -ETIMEDOUT;
return 0;
} | 0 | [
"CWE-476"
] | linux | 297a6961ffb8ff4dc66c9fbf53b924bd1dda05d5 | 308,662,719,833,484,100,000,000,000,000,000,000,000 | 17 | net: phy: mdio-bcm-unimac: fix potential NULL dereference in unimac_mdio_probe()
platform_get_resource() may fail and return NULL, so we should
better check it's return value to avoid a NULL pointer dereference
a bit later in the code.
This is detected by Coccinelle semantic patch.
@@
expression pdev, res, n, t, e, ... |
Variant c_SimpleXMLElementIterator::t_next() {
if (m_iter1 == nullptr) return uninit_null();
if (m_parent->m_is_attribute) {
m_iter1->next();
return uninit_null();
}
if (m_iter2) {
m_iter2->next();
if (!m_iter2->end()) {
return uninit_null();
}
delete m_iter2; m_iter2 = nullptr;
... | 0 | [
"CWE-94"
] | hhvm | 95f96e7287effe2fcdfb9a5338d1a7e4f55b083b | 113,426,835,653,655,920,000,000,000,000,000,000,000 | 27 | Fix libxml_disable_entity_loader()
This wasn't calling requestInit and setting the libxml handler no null.
So the first time an error came along it would reset the handler from
no-op to reading again.
This is a much better fix, we set our custom handler in requestInit and
when libxml_disable_entity_loader we store th... |
static void remove_pidfile(const char *pid_file) {
if (pid_file == NULL)
return;
if (unlink(pid_file) != 0) {
vperror("Could not remove the pid file %s", pid_file);
}
} | 0 | [
"CWE-189"
] | memcached | 6695ccbc525c36d693aaa3e8337b36aa0c784424 | 10,388,221,766,743,117,000,000,000,000,000,000,000 | 9 | Fix segfault on specially crafted packet. |
static inline int rx_work_todo(struct xen_netbk *netbk)
{
return !skb_queue_empty(&netbk->rx_queue);
} | 0 | [
"CWE-399"
] | linux | 7d5145d8eb2b9791533ffe4dc003b129b9696c48 | 63,504,267,028,494,610,000,000,000,000,000,000,000 | 4 | xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop.
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
void gnutls_deinit(gnutls_session_t session)
{
unsigned int i;
if (session == NULL)
return;
/* remove auth info firstly */
_gnutls_free_auth_info(session);
_gnutls_handshake_internal_state_clear(session);
_gnutls_handshake_io_buffer_clear(session);
_gnutls_hello_ext_priv_deinit(session);
for (i = 0; i < M... | 0 | [] | gnutls | 3d7fae761e65e9d0f16d7247ee8a464d4fe002da | 314,989,674,159,162,950,000,000,000,000,000,000,000 | 63 | valgrind: check if session ticket key is used without initialization
This adds a valgrind client request for
session->key.session_ticket_key to make sure that it is not used
without initialization.
Signed-off-by: Daiki Ueno <ueno@gnu.org> |
int kvm_vcpu_write_guest_page(struct kvm_vcpu *vcpu, gfn_t gfn,
const void *data, int offset, int len)
{
struct kvm_memory_slot *slot = kvm_vcpu_gfn_to_memslot(vcpu, gfn);
return __kvm_write_guest_page(vcpu->kvm, slot, gfn, data, offset, len);
} | 0 | [
"CWE-119"
] | linux | f8be156be163a052a067306417cd0ff679068c97 | 276,416,143,107,251,050,000,000,000,000,000,000,000 | 7 | KVM: do not allow mapping valid but non-reference-counted pages
It's possible to create a region which maps valid but non-refcounted
pages (e.g., tail pages of non-compound higher order allocations). These
host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family
of APIs, which take a reference to the p... |
xfs_inode_to_disk(
struct xfs_inode *ip,
struct xfs_dinode *to,
xfs_lsn_t lsn)
{
struct xfs_icdinode *from = &ip->i_d;
struct inode *inode = VFS_I(ip);
to->di_magic = cpu_to_be16(XFS_DINODE_MAGIC);
to->di_onlink = 0;
to->di_version = from->di_version;
to->di_format = from->di_format;
to->di_uid = cpu_to_b... | 0 | [] | linux | b42db0860e13067fcc7cbfba3966c9e652668bbc | 317,289,871,014,915,200,000,000,000,000,000,000,000 | 55 | xfs: enhance dinode verifier
Add several more validations to xfs_dinode_verify:
- For LOCAL data fork formats, di_nextents must be 0.
- For LOCAL attr fork formats, di_anextents must be 0.
- For inodes with no attr fork offset,
- format must be XFS_DINODE_FMT_EXTENTS if set at all
- di_anextents must be 0.
Thank... |
int snd_usb_pipe_sanity_check(struct usb_device *dev, unsigned int pipe)
{
static const int pipetypes[4] = {
PIPE_CONTROL, PIPE_ISOCHRONOUS, PIPE_BULK, PIPE_INTERRUPT
};
struct usb_host_endpoint *ep;
ep = usb_pipe_endpoint(dev, pipe);
if (!ep || usb_pipetype(pipe) != pipetypes[usb_endpoint_type(&ep->desc)])
r... | 0 | [
"CWE-476"
] | linux | 5d78e1c2b7f4be00bbe62141603a631dc7812f35 | 50,798,574,985,299,720,000,000,000,000,000,000,000 | 12 | ALSA: usb-audio: Fix gpf in snd_usb_pipe_sanity_check
syzbot found the following crash on:
general protection fault: 0000 [#1] SMP KASAN
RIP: 0010:snd_usb_pipe_sanity_check+0x80/0x130 sound/usb/helper.c:75
Call Trace:
snd_usb_motu_microbookii_communicate.constprop.0+0xa0/0x2fb sound/usb/quirks.c:1007
s... |
int av_parser_parse2(AVCodecParserContext *s,
AVCodecContext *avctx,
uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size,
int64_t pts, int64_t dts,
int64_t pos)
{
int index, i;
uint8_t dum... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | f31011e9abfb2ae75bb32bc44e2c34194c8dc40a | 339,713,437,892,111,100,000,000,000,000,000,000,000 | 56 | avcodec/parser: reset indexes on realloc failure
Fixes Ticket2982
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
g_file_measure_disk_usage_async (GFile *file,
GFileMeasureFlags flags,
gint io_priority,
GCancellable *cancellable,
... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 250,129,689,799,702,320,000,000,000,000,000,000,000 | 16 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
R_API RList * /*<RBinClass>*/ r_bin_get_classes(RBin *bin) {
RBinObject *o = r_bin_cur_object (bin);
return o? o->classes: NULL;
} | 0 | [
"CWE-125"
] | radare2 | d31c4d3cbdbe01ea3ded16a584de94149ecd31d9 | 108,751,994,591,867,260,000,000,000,000,000,000,000 | 4 | Fix #8748 - Fix oobread on string search |
uint32_t vrend_renderer_object_insert(struct vrend_context *ctx, void *data,
uint32_t handle, enum virgl_object_type type)
{
return vrend_object_insert(ctx->sub->object_hash, data, handle, type);
} | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 205,507,759,442,427,200,000,000,000,000,000,000,000 | 5 | vrend: Add test to resource OOB write and fix it
v2: Also check that no depth != 1 has been send when none is due
Closes: #250
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
static struct sk_buff *isdn_ppp_decompress(struct sk_buff *skb, struct ippp_struct *is, struct ippp_struct *master,
int *proto)
{
void *stat = NULL;
struct isdn_ppp_compressor *ipc = NULL;
struct sk_buff *skb_out;
int len;
struct ippp_struct *ri;
struct isdn_ppp_resetparams rsparm;
unsigned char rsdata[I... | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 180,418,380,441,936,200,000,000,000,000,000,000,000 | 75 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
{
struct sock *sk = sock->sk;
struct net *net = sock_net(sk);
struct unix_sock *u = unix_sk(sk);
struct sockaddr_un *sunaddr = (struct sockaddr_un *)uaddr;
char *sun_path = sunaddr->sun_path;
struct dentry *dentry = NULL;
struct path... | 0 | [] | linux-2.6 | 16e5726269611b71c930054ffe9b858c1cea88eb | 101,060,182,756,179,780,000,000,000,000,000,000,000 | 118 | af_unix: dont send SCM_CREDENTIALS by default
Since commit 7361c36c5224 (af_unix: Allow credentials to work across
user and pid namespaces) af_unix performance dropped a lot.
This is because we now take a reference on pid and cred in each write(),
and release them in read(), usually done from another process,
eventua... |
static void bnx2x_parity_recover(struct bnx2x *bp)
{
bool global = false;
u32 error_recovered, error_unrecovered;
bool is_parity;
DP(NETIF_MSG_HW, "Handling parity\n");
while (1) {
switch (bp->recovery_state) {
case BNX2X_RECOVERY_INIT:
DP(NETIF_MSG_HW, "State is BNX2X_RECOVERY_INIT\n");
is_parity = bnx... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 305,783,641,704,275,170,000,000,000,000,000,000,000 | 154 | 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... |
void Http2UpstreamIntegrationTest::manySimultaneousRequests(uint32_t request_bytes, uint32_t) {
TestRandomGenerator rand;
const uint32_t num_requests = 50;
std::vector<Http::RequestEncoder*> encoders;
std::vector<IntegrationStreamDecoderPtr> responses;
std::vector<int> response_bytes;
autonomous_upstream_ =... | 1 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 211,585,361,828,745,030,000,000,000,000,000,000,000 | 40 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static int rtnl_valid_dump_net_req(const struct nlmsghdr *nlh, struct sock *sk,
struct rtnl_net_dump_cb *net_cb,
struct netlink_callback *cb)
{
struct netlink_ext_ack *extack = cb->extack;
struct nlattr *tb[NETNSA_MAX + 1];
int err, i;
err = nlmsg_parse_strict(nlh, sizeof(struct rtgenmsg), tb, NETNSA... | 0 | [
"CWE-200",
"CWE-190",
"CWE-326"
] | linux | 355b98553789b646ed97ad801a619ff898471b92 | 104,952,972,533,125,180,000,000,000,000,000,000,000 | 40 | netns: provide pure entropy for net_hash_mix()
net_hash_mix() currently uses kernel address of a struct net,
and is used in many places that could be used to reveal this
address to a patient attacker, thus defeating KASLR, for
the typical case (initial net namespace, &init_net is
not dynamically allocated)
I believe ... |
xfrm_policy_inexact_alloc_chain(struct xfrm_pol_inexact_bin *bin,
struct xfrm_policy *policy, u8 dir)
{
struct xfrm_pol_inexact_node *n;
struct net *net;
net = xp_net(policy);
lockdep_assert_held(&net->xfrm.xfrm_policy_lock);
if (xfrm_policy_inexact_insert_use_any_list(policy))
return &bin->hhead;
if (xf... | 0 | [
"CWE-703"
] | linux | f85daf0e725358be78dfd208dea5fd665d8cb901 | 130,793,388,562,813,990,000,000,000,000,000,000,000 | 58 | xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup()
xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of
pols[0]. This refcount can be dropped in xfrm_expand_policies() when
xfrm_expand_policies() return error. pols[0]'s refcount is balanced in
here. But xfrm_bundle_look... |
void Field_string::sort_string(uchar *to,uint length)
{
#ifdef DBUG_ASSERT_EXISTS
size_t tmp=
#endif
field_charset->coll->strnxfrm(field_charset,
to, length,
char_length() *
field_charset->strxfrm_multiply,
... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 105,351,285,926,911,570,000,000,000,000,000,000,000 | 14 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static int rsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey)
{
unsigned char *rk = NULL;
int rklen;
rklen = i2d_RSAPrivateKey(pkey->pkey.rsa, &rk);
if (rklen <= 0) {
RSAerr(RSA_F_RSA_PRIV_ENCODE, ERR_R_MALLOC_FAILURE);
return 0;
}
if (!PKCS8_pkey_set0(p8, OBJ_nid2o... | 0 | [] | openssl | 4b22cce3812052fe64fc3f6d58d8cc884e3cb834 | 110,784,177,939,436,730,000,000,000,000,000,000,000 | 19 | Reject invalid PSS parameters.
Fix a bug where invalid PSS parameters are not rejected resulting in a
NULL pointer exception. This can be triggered during certificate
verification so could be a DoS attack against a client or a server
enabling client authentication.
Thanks to Brian Carpenter for reporting this issues.... |
SPL_METHOD(SplDoublyLinkedList, rewind)
{
spl_dllist_object *intern = Z_SPLDLLIST_P(getThis());
if (zend_parse_parameters_none() == FAILURE) {
return;
}
spl_dllist_it_helper_rewind(&intern->traverse_pointer, &intern->traverse_position, intern->llist, intern->flags);
} | 0 | [
"CWE-415"
] | php-src | 28a6ed9f9a36b9c517e4a8a429baf4dd382fc5d5 | 313,763,549,962,670,700,000,000,000,000,000,000,000 | 10 | Fix bug #71735: Double-free in SplDoublyLinkedList::offsetSet |
chkpass_out(PG_FUNCTION_ARGS)
{
chkpass *password = (chkpass *) PG_GETARG_POINTER(0);
char *result;
result = (char *) palloc(16);
result[0] = ':';
strcpy(result + 1, password->password);
PG_RETURN_CSTRING(result);
} | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 303,985,812,312,439,760,000,000,000,000,000,000,000 | 11 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_op *op_data = opline+1;
zend_free_op free_op1, free_op_data1;
zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 244,974,789,023,373,600,000,000,000,000,000,000,000 | 113 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
inline void free_set_stmt_mem_root()
{
DBUG_ASSERT(!is_arena_for_set_stmt());
if (mem_root_for_set_stmt)
{
free_root(mem_root_for_set_stmt, MYF(0));
delete mem_root_for_set_stmt;
mem_root_for_set_stmt= 0;
}
} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 332,049,176,049,746,460,000,000,000,000,000,000,000 | 10 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
zdevicename(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
const char *dname;
check_read_type(*op, t_device);
if (op->value.pdevice == NULL)
/* This can happen if we invalidated devices on the stack by calling nulldevice after they were pushed */
return_error(gs_error_undefined);
dname = op-... | 0 | [] | ghostpdl | 661e8d8fb8248c38d67958beda32f3a5876d0c3f | 176,319,835,489,871,900,000,000,000,000,000,000,000 | 15 | Bug 700176: check the *output* device for LockSafetyParams
When calling .setdevice we were checking if LockSafetyParams was set, and if so
throwing an invalidaccess error.
The problem is, if another device, for example the pdf14 compositor is the 'top'
device, that does not (and cannot) honour LockSafetyParams.
To s... |
xmlDefaultExternalEntityLoader(const char *URL, const char *ID,
xmlParserCtxtPtr ctxt)
{
xmlParserInputPtr ret = NULL;
xmlChar *resource = NULL;
#ifdef DEBUG_EXTERNAL_ENTITIES
xmlGenericError(xmlGenericErrorContext,
"xmlDefaultExternalEntityLoader(%s, xxx)... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 310,285,448,768,902,030,000,000,000,000,000,000,000 | 36 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
TEST(FormatterTest, FormatCustom) {
Date date(2012, 12, 9);
EXPECT_THROW_MSG(fmt::format("{:s}", date), FormatError,
"unmatched '}' in format string");
} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 180,657,806,963,119,900,000,000,000,000,000,000,000 | 5 | Fix segfault on complex pointer formatting (#642) |
size_t olm_pk_key_length(void) {
return olm::encode_base64_length(CURVE25519_KEY_LENGTH);
} | 0 | [
"CWE-787"
] | olm | ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b | 254,981,264,088,932,300,000,000,000,000,000,000,000 | 3 | olm_pk_decrypt: Ensure inputs are of correct length. |
max_topfill(void)
{
int n;
n = plines_nofill(curwin->w_topline);
if (n >= curwin->w_height)
curwin->w_topfill = 0;
else
{
curwin->w_topfill = diff_check_fill(curwin, curwin->w_topline);
if (curwin->w_topfill + n > curwin->w_height)
curwin->w_topfill = curwin->w_height - n;
}
} | 0 | [
"CWE-122"
] | vim | 777e7c21b7627be80961848ac560cb0a9978ff43 | 286,068,800,814,948,830,000,000,000,000,000,000,000 | 14 | patch 8.2.3564: invalid memory access when scrolling without valid screen
Problem: Invalid memory access when scrolling without a valid screen.
Solution: Do not set VALID_BOTLINE in w_valid. |
static struct socket_address *tls_socket_get_my_addr(struct socket_context *sock, TALLOC_CTX *mem_ctx)
{
struct tls_context *tls = talloc_get_type(sock->private_data, struct tls_context);
return socket_get_my_addr(tls->socket, mem_ctx);
} | 0 | [] | samba | 22af043d2f20760f27150d7d469c7c7b944c6b55 | 169,089,918,527,009,850,000,000,000,000,000,000,000 | 5 | CVE-2013-4476: s4:libtls: check for safe permissions of tls private key file (key.pem)
If the tls key is not owned by root or has not mode 0600 samba will not
start up.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Baumbach <bb@s... |
static void expire_timers(struct timer_base *base, struct hlist_head *head)
{
while (!hlist_empty(head)) {
struct timer_list *timer;
void (*fn)(unsigned long);
unsigned long data;
timer = hlist_entry(head->first, struct timer_list, entry);
timer_stats_account_timer(timer);
base->running_timer = timer;
... | 1 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 270,531,969,593,363,830,000,000,000,000,000,000,000 | 27 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
static int intel_vgpu_set_intx_trigger(struct intel_vgpu *vgpu,
unsigned int index, unsigned int start, unsigned int count,
uint32_t flags, void *data)
{
return 0;
} | 0 | [
"CWE-20"
] | linux | 51b00d8509dc69c98740da2ad07308b630d3eb7d | 91,932,081,891,674,260,000,000,000,000,000,000,000 | 6 | drm/i915/gvt: Fix mmap range check
This is to fix missed mmap range check on vGPU bar2 region
and only allow to map vGPU allocated GMADDR range, which means
user space should support sparse mmap to get proper offset for
mmap vGPU aperture. And this takes care of actual pgoff in mmap
request as original code always doe... |
tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile,
T2P* t2p,
TIFF* output){
tsize_t written=0;
char buffer[32];
int buflen=0;
written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output);
written += t2pWriteFile(output,
(tdata_t) "/Type /XObject \n/Subtype /Image \n/Na... | 0 | [
"CWE-787"
] | libtiff | 7be2e452ddcf6d7abca88f41d3761e6edab72b22 | 37,242,852,271,470,010,000,000,000,000,000,000,000 | 70 | tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr
fixes #220 |
bool do_notify_parent(struct task_struct *tsk, int sig)
{
struct siginfo info;
unsigned long flags;
struct sighand_struct *psig;
bool autoreap = false;
BUG_ON(sig == -1);
/* do_notify_parent_cldstop should have been called instead. */
BUG_ON(task_is_stopped_or_traced(tsk));
BUG_ON(!tsk->ptrace &&
... | 0 | [
"CWE-20",
"CWE-362"
] | linux | 9899d11f654474d2d54ea52ceaa2a1f4db3abd68 | 182,413,696,403,871,500,000,000,000,000,000,000,000 | 87 | ptrace: ensure arch_ptrace/ptrace_request can never race with SIGKILL
putreg() assumes that the tracee is not running and pt_regs_access() can
safely play with its stack. However a killed tracee can return from
ptrace_stop() to the low-level asm code and do RESTORE_REST, this means
that debugger can actually read/mod... |
compile_def_function(
ufunc_T *ufunc,
int check_return_type,
compiletype_T compile_type,
cctx_T *outer_cctx)
{
char_u *line = NULL;
garray_T lines_to_free;
char_u *p;
char *errormsg = NULL; // error message
cctx_T cctx;
garray_T *instr;
int did_emsg_before = did_emsg;
int did_... | 0 | [
"CWE-416"
] | vim | 1889f499a4f248cd84e0e0bf6d0d820016774494 | 119,727,654,294,199,710,000,000,000,000,000,000,000 | 781 | patch 9.0.0221: accessing freed memory if compiling nested function fails
Problem: Accessing freed memory if compiling nested function fails.
Solution: Mess up the variable name so that it won't be found. |
static FontInstance *GTextFieldGetFont(GGadget *g) {
GTextField *gt = (GTextField *) g;
return( gt->font );
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 181,434,071,683,870,470,000,000,000,000,000,000,000 | 4 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
gxps_archive_input_stream_next_piece (GXPSArchiveInputStream *stream)
{
gchar *dirname;
gchar *prefix;
if (!stream->is_interleaved)
return;
dirname = g_path_get_dirname (archive_entry_pathname (stream->entry));
if (!dirname)
return;
stre... | 0 | [
"CWE-125"
] | libgxps | b458226e162fe1ffe7acb4230c114a52ada5131b | 144,486,066,952,425,270,000,000,000,000,000,000,000 | 29 | gxps-archive: Ensure gxps_archive_read_entry() fills the GError in case of failure
And fix the callers to not overwrite the GError. |
static void announce(int mod)
{
struct ifsock *ifs;
logit(LOG_INFO, "Sending SSDP NOTIFY new:%d ...", mod);
LIST_FOREACH(ifs, &il, link) {
size_t i;
if (mod && !ifs->mod)
continue;
ifs->mod = 0;
// send_search(ifs, "upnp:rootdevice");
for (i = 0; supported_types[i]; i++) {
/* UUID sent in SSDP_ST_... | 0 | [
"CWE-119",
"CWE-787"
] | ssdp-responder | ce04b1f29a137198182f60bbb628d5ceb8171765 | 41,587,177,510,743,863,000,000,000,000,000,000,000 | 23 | Fix #1: Ensure recv buf is always NUL terminated
Signed-off-by: Joachim Nilsson <troglobit@gmail.com> |
xsltNumberFormatGetValue(xmlXPathContextPtr context,
xmlNodePtr node,
const xmlChar *value,
double *number)
{
int amount = 0;
xmlBufferPtr pattern;
xmlXPathObjectPtr obj;
pattern = xmlBufferCreate();
if (pattern != NULL) {
xmlBufferCCat(pattern, "number(");
xmlBufferCat(pattern, value... | 0 | [
"CWE-119"
] | libxslt | d182d8f6ba3071503d96ce17395c9d55871f0242 | 210,969,800,723,235,500,000,000,000,000,000,000,000 | 26 | Fix xsltNumberFormatGetMultipleLevel
Namespace nodes are actually an xmlNs, not an xmlNode. They must be
special-cased in xsltNumberFormatGetMultipleLevel to avoid an
out-of-bounds heap access.
Move the test whether a node matches the "count" pattern to a separate
function to make the code more readable. As a side ef... |
DLLIMPORT cfg_t *cfg_addtsec(cfg_t *cfg, const char *name, const char *title)
{
cfg_opt_t *opt;
cfg_value_t *val;
if (cfg_gettsec(cfg, name, title))
return NULL;
opt = cfg_getopt(cfg, name);
if (!opt) {
cfg_error(cfg, _("no such option '%s'"), name);
return NULL;
}
val = cfg_setopt(cfg, opt, title);
if ... | 0 | [] | libconfuse | d73777c2c3566fb2647727bb56d9a2295b81669b | 62,662,134,783,259,260,000,000,000,000,000,000,000 | 23 | Fix #163: unterminated username used with getpwnam()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com> |
static inline void net_tx_pkt_sendv(struct NetTxPkt *pkt,
NetClientState *nc, const struct iovec *iov, int iov_cnt)
{
if (pkt->is_loopback) {
qemu_receive_packet_iov(nc, iov, iov_cnt);
} else {
qemu_sendv_packet(nc, iov, iov_cnt);
}
} | 0 | [
"CWE-835"
] | qemu | 8c552542b81e56ff532dd27ec6e5328954bdda73 | 241,617,963,706,423,720,000,000,000,000,000,000,000 | 9 | tx_pkt: switch to use qemu_receive_packet_iov() for loopback
This patch switches to use qemu_receive_receive_iov() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@r... |
void RemoteFsDevice::setAudioFolder() const
{
audioFolder=Utils::fixPath(mountPoint(details, true));
} | 0 | [
"CWE-20",
"CWE-22"
] | cantata | afc4f8315d3e96574925fb530a7004cc9e6ce3d3 | 33,159,988,533,244,830,000,000,000,000,000,000,000 | 4 | Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested |
nautilus_file_class_init (NautilusFileClass *class)
{
GtkIconTheme *icon_theme;
attribute_name_q = g_quark_from_static_string ("name");
attribute_size_q = g_quark_from_static_string ("size");
attribute_type_q = g_quark_from_static_string ("type");
attribute_modification_date_q = g_quark_from_static_string ("modi... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 239,963,143,569,179,740,000,000,000,000,000,000,000 | 82 | 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-... |
CImg<T>& columns(const int x0, const int x1) {
return get_columns(x0,x1).move_to(*this);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 111,277,627,077,924,790,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. |
check_for_string_or_list_or_dict_arg(typval_T *args, int idx)
{
if (args[idx].v_type != VAR_STRING
&& args[idx].v_type != VAR_LIST
&& args[idx].v_type != VAR_DICT)
{
semsg(_(e_string_list_or_dict_required_for_argument_nr), idx + 1);
return FAIL;
}
return OK;
} | 0 | [
"CWE-125",
"CWE-122"
] | vim | 1e56bda9048a9625bce6e660938c834c5c15b07d | 181,878,178,122,353,940,000,000,000,000,000,000,000 | 11 | patch 9.0.0104: going beyond allocated memory when evaluating string constant
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form. |
user_func_error(int error, char_u *name, funcexe_T *funcexe)
{
switch (error)
{
case FCERR_UNKNOWN:
if (funcexe->fe_found_var)
semsg(_(e_not_callable_type_str), name);
else
emsg_funcname(e_unknown_function_str, name);
break;
case FCERR_NOTMETHOD:
emsg_funcname(
N_(e_cannot_use_function_... | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 265,534,366,733,353,200,000,000,000,000,000,000,000 | 33 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. |
static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr *nlh,
struct netlink_ext_ack *extack)
{
struct net *net = sock_net(skb->sk);
struct net *tgt_net = net;
struct ifinfomsg *ifm;
char ifname[IFNAMSIZ];
struct nlattr *tb[IFLA_MAX+1];
struct net_device *dev = NULL;
struct sk_buff *nskb;
int netnsid = ... | 0 | [
"CWE-476"
] | linux | f428fe4a04cc339166c8bbd489789760de3a0cee | 155,405,117,827,231,860,000,000,000,000,000,000,000 | 65 | rtnetlink: give a user socket to get_target_net()
This function is used from two places: rtnl_dump_ifinfo and
rtnl_getlink. In rtnl_getlink(), we give a request skb into
get_target_net(), but in rtnl_dump_ifinfo, we give a response skb
into get_target_net().
The problem here is that NETLINK_CB() isn't initialized for ... |
int main( int argc, char *argv[] )
{
FILE *f;
int ret;
size_t i;
rsa_context rsa;
unsigned char hash[20];
unsigned char buf[POLARSSL_MPI_MAX_SIZE];
char filename[512];
ret = 1;
if( argc != 3 )
{
printf( "usage: rsa_verify_pss <key_file> <filename>\n" );
#if defined(_WIN... | 1 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 101,114,238,879,942,060,000,000,000,000,000,000,000 | 88 | RSA blinding on CRT operations to counter timing attacks |
GF_Err btrt_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_BitRateBox *ptr = (GF_BitRateBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->bufferSizeDB);
gf_bs_write_u32(bs, ptr->maxBitrate);
gf_bs_write_u32(bs, ptr->avgBitrate);
return GF_O... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 165,053,812,467,201,330,000,000,000,000,000,000,000 | 12 | fix some exploitable overflows (#994, #997) |
static int check_cond_jmp_op(struct bpf_verifier_env *env,
struct bpf_insn *insn, int *insn_idx)
{
struct bpf_verifier_state *this_branch = env->cur_state;
struct bpf_verifier_state *other_branch;
struct bpf_reg_state *regs = this_branch->frame[this_branch->curframe]->regs;
struct bpf_reg_state *dst_reg, *o... | 1 | [
"CWE-703",
"CWE-189"
] | linux | 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 | 26,746,519,164,483,106,000,000,000,000,000,000,000 | 117 | bpf: prevent out of bounds speculation on pointer arithmetic
Jann reported that the original commit back in b2157399cc98
("bpf: prevent out-of-bounds speculation") was not sufficient
to stop CPU from speculating out of bounds memory access:
While b2157399cc98 only focussed on masking array map access
for unprivileged ... |
int jas_stream_flushbuf(jas_stream_t *stream, int c)
{
int len;
int n;
/* The stream should not be in an error or EOF state. */
if ((stream->flags_ & (JAS_STREAM_ERRMASK)) != 0) {
return EOF;
}
/* The stream must be open for writing. */
if ((stream->openmode_ & (JAS_STREAM_WRITE | JAS_STREAM_APPEND)) == 0) {... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 267,696,890,211,774,700,000,000,000,000,000,000,000 | 42 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
static SDL_INLINE int hasNEON()
{
static int val = -1;
if (val != -1) {
return val;
}
val = SDL_HasNEON();
return val;
} | 0 | [
"CWE-190",
"CWE-787"
] | SDL_ttf | db1b41ab8bde6723c24b866e466cad78c2fa0448 | 339,410,186,121,958,260,000,000,000,000,000,000,000 | 9 | More integer overflow (see bug #187)
Make sure that 'width + alignment' doesn't overflow, otherwise
it could create a SDL_Surface of 'width' but with wrong 'pitch' |
ConsumerReg(qqueue_t *pThis, wti_t *pWti)
{
int iCancelStateSave;
DEFiRet;
ISOBJ_TYPE_assert(pThis, qqueue);
ISOBJ_TYPE_assert(pWti, wti);
CHKiRet(DequeueForConsumer(pThis, pWti));
/* we now have a non-idle batch of work, so we can release the queue mutex and process it */
d_pthread_mutex_unlock(pThis->mut);
... | 0 | [
"CWE-772"
] | rsyslog | dfa88369d4ca4290db56b843f9eabdae1bfe0fd5 | 56,621,731,657,061,930,000,000,000,000,000,000,000 | 39 | bugfix: memory leak when $RepeatedMsgReduction on was used
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225 |
static bool verify_and_prune(const char *cgroup_use)
{
const char *p;
char *e;
int i, j;
for (p = cgroup_use; p && *p; p = e + 1) {
e = strchr(p, ',');
if (e)
*e = '\0';
if (!in_subsystem_list(p)) {
ERROR("Controller %s required by lxc.cgroup.use but not available\n", p);
return false;
}
if (e... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 197,744,606,998,768,060,000,000,000,000,000,000,000 | 36 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
alert_match_word (char *word, char *masks)
{
char *p = masks;
char endchar;
int res;
if (masks[0] == 0)
return FALSE;
while (1)
{
/* if it's a 0, space or comma, the word has ended. */
if (*p == 0 || *p == ' ' || *p == ',')
{
endchar = *p;
*p = 0;
res = match (masks, word);
*p = endchar;
... | 0 | [
"CWE-22"
] | hexchat | 4e061a43b3453a9856d34250c3913175c45afe9d | 142,619,710,863,796,490,000,000,000,000,000,000,000 | 29 | Clean up handling CAP LS |
MagickExport ChannelPerceptualHash *GetImagePerceptualHash(const Image *image,
ExceptionInfo *exception)
{
ChannelPerceptualHash
*perceptual_hash;
char
*colorspaces,
*p,
*q;
const char
*artifact;
MagickBooleanType
status;
ssize_t
i;
perceptual_hash=(ChannelPerceptualHash *... | 0 | [] | ImageMagick | 4717744e4bb27de8ea978e51c6d5bcddf62ffe49 | 236,022,336,421,504,100,000,000,000,000,000,000,000 | 76 | https://github.com/ImageMagick/ImageMagick/issues/3332 |
TEST_F(RouterTest, AppendUpstreamHost11) {
testAppendUpstreamHost(
absl::make_optional(Http::LowerCaseString("x-custom-upstream-hostname")),
absl::make_optional(Http::LowerCaseString("x-custom-upstream-host-address")));
} | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 74,873,757,588,616,140,000,000,000,000,000,000,000 | 5 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
p11_rpc_buffer_free (p11_buffer *buf)
{
if (buf == NULL)
return;
p11_buffer_uninit (buf);
free (buf);
} | 0 | [
"CWE-787"
] | p11-kit | 2617f3ef888e103324a28811886b99ed0a56346d | 48,722,575,878,319,560,000,000,000,000,000,000,000 | 8 | Check attribute length against buffer size
If an attribute's length does not match the length of the byte array
inside it, one length was used for allocation, and the other was used
for memcpy. This additional check will instead return an error on
malformed messages. |
QPDF::resolveObjectsInStream(int obj_stream_number)
{
// Force resolution of object stream
QPDFObjectHandle obj_stream = getObjectByID(obj_stream_number, 0);
if (! obj_stream.isStream())
{
throw QPDFExc(qpdf_e_damaged_pdf, this->m->file->getName(),
this->m->last_object_description,
this... | 1 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 153,430,860,824,356,650,000,000,000,000,000,000,000 | 101 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
void synthesize_relcall(void *from, void *to)
{
__synthesize_relative_insn(from, to, RELATIVECALL_OPCODE);
} | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 201,277,276,651,982,340,000,000,000,000,000,000,000 | 4 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
**/
const CImg<T>& save_rgb(const char *const filename) const {
return _save_rgb(0,filename); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 194,798,718,426,806,770,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
ebb_ews_items_to_contacts (EBookBackendEws *bbews,
const GSList *new_items,
GSList **contacts,
GCancellable *cancellable,
GError **error)
{
GSList *link;
for (link = (GSList *) new_items; link; link = g_slist_next (link)) {
EContact *contact;
EEwsItem *item = link->data;
EVCardAttribute... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 158,761,162,821,599,700,000,000,000,000,000,000,000 | 24 | 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 |
static void cache_grow_end(struct kmem_cache *cachep, struct page *page)
{
struct kmem_cache_node *n;
void *list = NULL;
check_irq_off();
if (!page)
return;
INIT_LIST_HEAD(&page->lru);
n = get_node(cachep, page_to_nid(page));
spin_lock(&n->list_lock);
n->total_slabs++;
if (!page->active) {
list_add_tai... | 0 | [
"CWE-703"
] | linux | c4e490cf148e85ead0d1b1c2caaba833f1d5b29f | 167,591,562,200,029,800,000,000,000,000,000,000,000 | 27 | mm/slab.c: fix SLAB freelist randomization duplicate entries
This patch fixes a bug in the freelist randomization code. When a high
random number is used, the freelist will contain duplicate entries. It
will result in different allocations sharing the same chunk.
It will result in odd behaviours and crashes. It sh... |
/* {{{ php_mktime - (gm)mktime helper */
PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
{
long hou = 0, min = 0, sec = 0, mon = 0, day = 0, yea = 0, dst = -1;
timelib_time *now;
timelib_tzinfo *tzi = NULL;
long ts, adjust_seconds = 0;
int error;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC... | 0 | [] | php-src | bb057498f7457e8b2eba98332a3bad434de4cf12 | 32,128,432,420,572,236,000,000,000,000,000,000,000 | 89 | Fix #70277: new DateTimeZone($foo) is ignoring text after null byte
The DateTimeZone constructors are not binary safe. They're parsing the timezone
as string, but discard the length when calling timezone_initialize(). This
patch adds a tz_len parameter and a respective check to timezone_initialize(). |
static int check_purpose_crl_sign(const X509_PURPOSE *xp, const X509 *x, int ca)
{
if(ca) {
int ca_ret;
if((ca_ret = check_ca(x)) != 2) return ca_ret;
else return 0;
}
if(ku_reject(x, KU_CRL_SIGN)) return 0;
return 1;
} | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 213,676,989,977,893,340,000,000,000,000,000,000,000 | 10 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
static void genl_unregister_mc_groups(struct genl_family *family)
{
struct net *net;
int i;
netlink_table_grab();
rcu_read_lock();
for_each_net_rcu(net) {
for (i = 0; i < family->n_mcgrps; i++)
__netlink_clear_multicast_users(
net->genl_sock, family->mcgrp_offset + i);
}
rcu_read_unlock();
netlink_tab... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 172,737,261,470,982,280,000,000,000,000,000,000,000 | 24 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
MagickBooleanType
status;
MagickOffsetType
currentOffset,
offset,
scene;
MagickSizeType
cc;
PixelInfo
transpix;
QuantizeInfo
*quantize_info;
register ssize_t
x... | 1 | [
"CWE-190"
] | ImageMagick | db5e12e24f1378ce8c93a5c35991dcdd23a67bb0 | 303,958,891,479,009,840,000,000,000,000,000,000,000 | 349 | https://github.com/ImageMagick/ImageMagick/issues/1726 |
static inline void SetPixelOpacity(const Image *magick_restrict image,
const Quantum alpha,Quantum *magick_restrict pixel)
{
if (image->channel_map[AlphaPixelChannel].traits != UndefinedPixelTrait)
pixel[image->channel_map[AlphaPixelChannel].offset]=QuantumRange-alpha;
} | 0 | [
"CWE-20",
"CWE-125"
] | ImageMagick | 8187d2d8fd010d2d6b1a3a8edd935beec404dddc | 324,542,824,124,160,500,000,000,000,000,000,000,000 | 6 | https://github.com/ImageMagick/ImageMagick/issues/1610 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.